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(); }
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(); }
/** * {@inheritDoc} */ public function toArray() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array()); return parent::toArray(); }
public function toArray() { $this->__load(); return parent::toArray(); }