/** * @param Type $type */ public function __construct(\Platform\Type $type) { if ($type instanceof Entity) { $type->attach($this->getEventManager()); } $this->_type = $type; }
/** * @param \Platform\Type $type * @param array $config * @return \Platform\Type */ protected function configureType(\Platform\Type $type, array $config) { if (isset($config['entityType'])) { $type->setEntityType($config['entityType']); } if (isset($config['filter'])) { $type->setFilter($config['filter']); } if (isset($config['mixins'])) { foreach ($config['mixins'] as $mixin => $info) { $type->addMixin("entity_{$mixin}", $info); } } return $type; }
/** * @param $filter */ public function setFilter($filter) { $this->_type->setFilter($filter); }