/** * Constructs the Property Mapper. */ public function __construct() { // TODO Clean up this dependencies; inject the instance $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_Manager'); $this->validatorResolver = t3lib_div::makeInstance('Tx_Extbase_Validation_ValidatorResolver'); $this->validatorResolver->injectObjectManager($objectManager); $this->persistenceManager = Tx_Extbase_Dispatcher::getPersistenceManager(); $this->queryFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'); }
/** * Collects the base validators which were defined for the data type of each * controller argument and adds them to the argument's validator chain. * * @return void */ public function initializeControllerArgumentsBaseValidators() { foreach ($this->arguments as $argument) { $validator = $this->validatorResolver->getBaseValidatorConjunction($argument->getDataType()); if ($validator !== NULL) { $argument->setValidator($validator); } } }