Work On Criminal
This commit is contained in:
@@ -100,13 +100,16 @@ class Groups extends Fixture
|
||||
$NewGroup->addRank($newRank);
|
||||
}
|
||||
|
||||
foreach ($group['subgroups'] as $key => $subGroup) {
|
||||
$newSubGroup = new SubGroup();
|
||||
$newSubGroup->setName($subGroup['name']);
|
||||
$newSubGroup->setShortName($subGroup['shortname']);
|
||||
$manager->persist($newSubGroup);
|
||||
$NewGroup->addSubGroup($newSubGroup);
|
||||
}
|
||||
if (array_key_exists('subgroups', $group)) :
|
||||
foreach ($group['subgroups'] as $key => $subGroup) {
|
||||
$newSubGroup = new SubGroup();
|
||||
$newSubGroup->setName($subGroup['name']);
|
||||
$newSubGroup->setShortName($subGroup['shortname']);
|
||||
$manager->persist($newSubGroup);
|
||||
$NewGroup->addSubGroup($newSubGroup);
|
||||
}
|
||||
endif;
|
||||
|
||||
$manager->persist($NewGroup);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,6 @@ class Criminal extends Document
|
||||
*/
|
||||
private $directory;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Gedmo\Versioned
|
||||
*/
|
||||
private $article;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", nullable=true)
|
||||
* @Gedmo\Versioned
|
||||
@@ -42,12 +36,6 @@ class Criminal extends Document
|
||||
*/
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
* @Gedmo\Versioned
|
||||
*/
|
||||
private $accessorySentence;
|
||||
|
||||
public function __construct(User $user)
|
||||
{
|
||||
parent::__construct($user);
|
||||
@@ -66,18 +54,6 @@ class Criminal extends Document
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getArticle(): ?string
|
||||
{
|
||||
return $this->article;
|
||||
}
|
||||
|
||||
public function setArticle(string $article): self
|
||||
{
|
||||
$this->article = $article;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAmountMoney(): ?float
|
||||
{
|
||||
return $this->amountMoney;
|
||||
@@ -113,16 +89,4 @@ class Criminal extends Document
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAccessorySentence(): ?string
|
||||
{
|
||||
return $this->accessorySentence;
|
||||
}
|
||||
|
||||
public function setAccessorySentence(?string $accessorySentence): self
|
||||
{
|
||||
$this->accessorySentence = $accessorySentence;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,19 +17,9 @@ class CriminalType extends DocumentType
|
||||
|
||||
$builder
|
||||
|
||||
->add('article', null, ['label' => 'form_label_article', 'help' => 'form_help_article'])
|
||||
->add('content', ContentType::class, ['label' => 'form_label_informations' ])
|
||||
->add('amountMoney', null, ['label' => 'form_label_amount', 'help' => 'form_help_amount'])
|
||||
->add('amountTime', null, ['label' => 'form_label_time', 'help' => 'form_help_time'])
|
||||
->add(
|
||||
'accessorySentence',
|
||||
ContentType::class,
|
||||
['label' => 'form_label_accessorySentence',
|
||||
'help' => 'form_help_accessorySentence',
|
||||
'required' => false,
|
||||
'attr' => ['style' => 'height: 200px;']
|
||||
]
|
||||
)
|
||||
->add('content', ContentType::class, ['label' => 'form_label_informations', 'required' => false ])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ class CriminalRepository extends DocumentRepositoriesExtension
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Criminal::class);
|
||||
$this->fields = ['article', 'amountMoney', 'amountTime', 'content']; //with title, list fields we can search in
|
||||
$this->fields = ['amountMoney', 'amountTime', 'content']; //with title, list fields we can search in
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user