mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
Improving Fixtures CustomFieldsGroup for Report
This commit is contained in:
parent
a0f174a77b
commit
c1a76327d7
@ -29,20 +29,25 @@ use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
|||||||
/**
|
/**
|
||||||
* Load CustomFieldsGroup for Report into database
|
* Load CustomFieldsGroup for Report into database
|
||||||
*/
|
*/
|
||||||
class LoadCustomFieldsGroup extends AbstractFixture implements OrderedFixtureInterface {
|
class LoadCustomFieldsGroup extends AbstractFixture implements OrderedFixtureInterface
|
||||||
public function getOrder() {
|
{
|
||||||
|
public function getOrder()
|
||||||
|
{
|
||||||
return 15000;
|
return 15000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load(ObjectManager $manager) {
|
public function load(ObjectManager $manager)
|
||||||
|
{
|
||||||
echo "loading customFieldsGroup...\n";
|
echo "loading customFieldsGroup...\n";
|
||||||
|
|
||||||
for($i=0; $i <= 3; $i++) {
|
for($i=0; $i <= 3; $i++) {
|
||||||
|
echo "CFGroup Report {$i}\n";
|
||||||
$cFGroup = (new CustomFieldsGroup())
|
$cFGroup = (new CustomFieldsGroup())
|
||||||
->setName(array('fr' => 'CFGroup Report ' . $i))
|
->setName(array('fr' => 'CFGroup Report ' . $i))
|
||||||
->setEntity('Chill\ReportBundle\Entity\Report');
|
->setEntity('Chill\ReportBundle\Entity\Report');
|
||||||
|
|
||||||
$manager->persist($cFGroup);
|
$manager->persist($cFGroup);
|
||||||
|
$this->addReference('cf_group_report_'.$i, $cFGroup);
|
||||||
}
|
}
|
||||||
$manager->flush();
|
$manager->flush();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user