isPrivateEntityOrPrivateValueObject", interfaceName="Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerInterface") */ class PersistenceOwnerAspect { /** * @FLOW3\Pointcut("classAnnotatedWith(TYPO3\FLOW3\Annotations\Entity) || classAnnotatedWith(Doctrine\ORM\Mapping\Entity)") */ public function isEntity() {} /** * @FLOW3\Pointcut("Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerAspect->isEntity || classAnnotatedWith(TYPO3\FLOW3\Annotations\ValueObject)") */ public function isEntityOrValueObject() {} /** * @FLOW3\Pointcut("classAnnotatedWith(Ttree\Medialib\Core\Annotations\PrivateEntity) && Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerAspect->isEntity") */ public function isPrivateEntity() {} /** * @FLOW3\Pointcut("classAnnotatedWith(Ttree\Medialib\Core\Annotations\PrivateEntity) && Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerAspect->isEntityOrValueObject") */ public function isPrivateEntityOrPrivateValueObject() {} /** * @FLOW3\Inject * @var \TYPO3\FLOW3\Security\Context */ protected $securityContext; /** * @var \Ttree\Medialib\Core\Domain\Model\Domain * @ORM\ManyToOne * @FLOW3\Introduce("Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerAspect->isPrivateEntityOrPrivateValueObject") */ protected $medialib_owner; /** * @param \TYPO3\FLOW3\Aop\JoinPointInterface $joinPoint The current join point * @return void * @FLOW3\Before("Ttree\Medialib\Core\Persistence\Aspect\PersistenceOwnerAspect->isPrivateEntityOrPrivateValueObject && method(.*->(__construct|__clone)())") */ public function prepareEntityOwner(\TYPO3\FLOW3\Aop\JoinPointInterface $joinPoint) { $proxy = $joinPoint->getProxy(); \TYPO3\FLOW3\Reflection\ObjectAccess::setProperty($proxy, 'medialib_owner', $this->securityContext->getDomain(), TRUE); } } ?>