create Access Control Model

This commit is contained in:
2014-10-28 18:24:34 +01:00
parent ec3e08ff79
commit 7fc8b1ca1e
14 changed files with 501 additions and 48 deletions

View File

@@ -39,21 +39,30 @@ class LoadCenters extends AbstractFixture implements OrderedFixtureInterface
return 100;
}
public static $centers = array(
array(
'name' => 'Center A',
'ref' => 'centerA'
),
array(
'name' => 'Center B',
'ref' => 'centerB'
)
);
public static $refs = array();
public function load(ObjectManager $manager)
{
$centerA = new Center();
$centerA->setName('Center A');
$manager->persist($centerA);
$this->addReference('centerA', $centerA);
$centerB = new Center();
$centerB->setName('center B');
$manager->persist($centerB);
$this->addReference('centerB', $centerB);
foreach (static::$centers as $new) {
$centerA = new Center();
$centerA->setName($new['name']);
$manager->persist($centerA);
$this->addReference($new['ref'], $centerA);
static::$refs[] = $new['ref'];
}
$manager->flush();
}
}