public function __construct($label, TranslationContainer $translationContainer, \Psc\CMS\EntityForm $form, ComponentMapper $mapper = NULL, Labeler $labeler = NULL, Manager $manager = NULL) { parent::__construct($label, $translationContainer, $form); $this->componentMapper = $mapper ?: new ComponentMapper(); $this->labeler = $labeler ?: new Labeler(); $this->manager = $manager ?: new Manager(); // automatic subscription for entity if (($entity = $this->getEntity()) instanceof ComponentsCreaterListener) { $this->subscribe($entity); } }