The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Ability to assign documents to groups.

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
master
Gergely Polonkai (W00d5t0ck) 10 years ago
parent a8f1f85573
commit 0f112feabe
  1. 9
      src/KekRozsak/FrontBundle/Entity/Document.php
  2. 7
      src/KekRozsak/FrontBundle/Entity/Group.php
  3. 13
      src/KekRozsak/FrontBundle/Form/Type/DocumentType.php

@ -210,7 +210,12 @@ class Document
/**
* @var Doctrine\Common\Collections\ArrayCollection $groups
* @ORM\ManyToMany(targetEntity="KekRozsak\FrontBundle\Entity\Group", mappedBy="documents")
* @ORM\ManyToMany(targetEntity="KekRozsak\FrontBundle\Entity\Group", inversedBy="documents")
* @ORM\JoinTable(name="group_document", joinColumns={
* @ORM\JoinColumn(name="document_id", referencedColumnName="id"),
* }, inverseJoinColumns={
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* })
*/
protected $groups;
@ -234,7 +239,7 @@ class Document
*/
public function getGroups()
{
return $this->group;
return $this->groups;
}
/**

@ -354,12 +354,7 @@ class Group
*
* @var Doctrine\Common\Collections\ArrayCollection $documents
*
* @ORM\ManyToMany(targetEntity="Document", inversedBy="groups", fetch="LAZY")
* @ORM\JoinTable(name="group_document", inverseJoinColumns={
* @ORM\JoinColumn(name="document_id", referencedColumnName="id"),
* }, joinColumns={
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* })
* @ORM\ManyToMany(targetEntity="Document", mappedBy="groups", fetch="LAZY")
*/
protected $documents;

@ -12,14 +12,19 @@ class DocumentType extends AbstractType
$builder->add('title', null, array(
'label' => 'A dokumentum címe',
)
);
)
->add('groups', null, array(
'label' => 'Csoportok',
'property' => 'name',
'required' => true,
)
)
$builder->add('content', 'ckeditor', array(
->add('content', 'ckeditor', array(
'label' => ' ',
)
);
// TODO: possibility to add to other groups!
}
public function getName()

Loading…
Cancel
Save