/** * * @return $this */ protected function loadTypes() { $config = $this->manager->getConfig($this->name); $types = isset($config['types']) ? (array) $config['types'] : array(); $this->types = array(); foreach ($types as $name => $type) { if (!$type instanceof Type) { $type = Type::objectify($type, array($this, $name)); } $this->types[$name] = $type; } return $this; }
/** * Constructor * * @param Type $type */ public function __construct(Type $type) { $manager = $type->getResource()->getManager(); parent::__construct($manager); $this->type = $type; }