コード例 #1
0
ファイル: LoadResource.php プロジェクト: feijojr/EADGestao
 public function load(ObjectManager $manager)
 {
     $resource = new Resource();
     $resource->setNome("Posts");
     $manager->persist($resource);
     $resource = new Resource();
     $resource->setNome("Páginas");
     $manager->persist($resource);
     $manager->flush();
 }
コード例 #2
0
 public function load(ObjectManager $manager)
 {
     $resource = new Resource();
     $resource->setNome('Posts');
     $manager->persist($resource);
     $resource = new Resource();
     $resource->setNome('Páginas');
     $manager->persist($resource);
     $resource = new Resource();
     $resource->setNome('Categorias');
     $manager->persist($resource);
     $resource = new Resource();
     $resource->setNome('Usuários');
     $manager->persist($resource);
     $manager->flush();
 }
コード例 #3
0
 /**
  * {@inheritDoc}
  */
 public function toArray()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array());
     return parent::toArray();
 }
コード例 #4
0
 public function toArray()
 {
     $this->__load();
     return parent::toArray();
 }