Ejemplo n.º 1
0
 /**
  * @param ResourceInterface $resource
  *
  * @return Definition
  */
 private function createRepositoryDefinition(ResourceInterface $resource)
 {
     $definition = new Definition($resource->getRepository(), [$resource->getModel()]);
     $definition->setFactory([new Reference('lug.manager.' . $resource->getName()), 'getRepository']);
     $definition->addTag('lug.repository', ['resource' => $resource->getName()]);
     return $definition;
 }