mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
remove print in load fixtures
This commit is contained in:
parent
a96e5e25ce
commit
6adcdaa69a
@ -141,7 +141,6 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface, C
|
|||||||
$ref = 'activity_'.$person->getFullnameCanonical();
|
$ref = 'activity_'.$person->getFullnameCanonical();
|
||||||
|
|
||||||
for($i = 0; $i < $activityNbr; $i ++) {
|
for($i = 0; $i < $activityNbr; $i ++) {
|
||||||
print "Creating an activity type for : ".$person." (ref: ".$ref.") \n";
|
|
||||||
$activity = $this->newRandomActivity($person);
|
$activity = $this->newRandomActivity($person);
|
||||||
$manager->persist($activity);
|
$manager->persist($activity);
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,6 @@ class LoadCustomField extends AbstractFixture implements OrderedFixtureInterface
|
|||||||
|
|
||||||
public function load(ObjectManager $manager)
|
public function load(ObjectManager $manager)
|
||||||
{
|
{
|
||||||
echo "loading CustomField...\n";
|
|
||||||
|
|
||||||
$cFTypes = [
|
$cFTypes = [
|
||||||
array('type' => 'text', 'options' => array('maxLength' => '255')),
|
array('type' => 'text', 'options' => array('maxLength' => '255')),
|
||||||
array('type' => 'text', 'options' => array('maxLength' => '1000')),
|
array('type' => 'text', 'options' => array('maxLength' => '1000')),
|
||||||
@ -78,7 +76,6 @@ class LoadCustomField extends AbstractFixture implements OrderedFixtureInterface
|
|||||||
];
|
];
|
||||||
|
|
||||||
for($i=0; $i <= 25; $i++) {
|
for($i=0; $i <= 25; $i++) {
|
||||||
echo "CustomField {$i}\n";
|
|
||||||
$cFType = $cFTypes[rand(0,sizeof($cFTypes) - 1)];
|
$cFType = $cFTypes[rand(0,sizeof($cFTypes) - 1)];
|
||||||
|
|
||||||
$customField = (new CustomField())
|
$customField = (new CustomField())
|
||||||
|
@ -92,15 +92,19 @@ class LoadReports extends AbstractFixture implements OrderedFixtureInterface, Co
|
|||||||
->findOneBy(array('firstName' => 'Charline', 'lastName' => 'DEPARDIEU'))
|
->findOneBy(array('firstName' => 'Charline', 'lastName' => 'DEPARDIEU'))
|
||||||
;
|
;
|
||||||
|
|
||||||
$report = (new Report())
|
if (NULL !== $charline) {
|
||||||
|
$report = (new Report())
|
||||||
->setPerson($charline)
|
->setPerson($charline)
|
||||||
->setCFGroup($this->getReference('cf_group_report_logement'))
|
->setCFGroup($this->getReference('cf_group_report_logement'))
|
||||||
->setDate(new \DateTime('2015-01-05'))
|
->setDate(new \DateTime('2015-01-05'))
|
||||||
->setScope($this->getReference('scope_social'))
|
->setScope($this->getReference('scope_social'))
|
||||||
;
|
;
|
||||||
$this->fillReport($report);
|
$this->fillReport($report);
|
||||||
|
|
||||||
$manager->persist($report);
|
$manager->persist($report);
|
||||||
|
} else {
|
||||||
|
print("WARNING: Charline DEPARDIEU not found in database");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user