/** * Get object manager for Version * * @return ObjectManager */ public function getObjectManager() { return $this->registry->getManagerForClass('Akeneo\\Component\\Versioning\\Model\\Version'); }
/** * Checks if the given class is real entity class * * @param string $className * * @return bool */ public function isEntity($className) { return !is_null($this->doctrine->getManagerForClass($className)); }
/** * Returns the manager for an entity * * @param object|string $entity * * @return \Doctrine\Common\Persistence\ObjectManager */ protected function getManager($entity) { return $this->doctrine->getManagerForClass(is_object($entity) ? ClassUtils::getClass($entity) : $entity); }
/** * Get object manager for Version * * @return \Doctrine\Common\Persistence\ObjectManager */ public function getObjectManager() { return $this->registry->getManagerForClass('Pim\\Bundle\\VersioningBundle\\Model\\Version'); }
public function let(SmartManagerRegistry $doctrine, EntityRepository $repository, EntityManager $entityManager, PropertyAccessorInterface $propertyAccessor) { $doctrine->getRepository('entity_class')->willReturn($repository); $doctrine->getManagerForClass('stdClass')->willReturn($entityManager); $this->beConstructedWith($doctrine, $propertyAccessor); }