/** @inheritdoc */ public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity) { // Get all locales $locales = \samson\core\SamsonLocale::get(); // Set current locale as first value of array $localArray = array(locale()); // Iterate all locales foreach ($locales as $local) { // Avoid current locale if ($local == locale()) { continue; } $localArray[] = $local; } // Set locales in the new order \samson\core\SamsonLocale::$locales = $localArray; // TODO This is fix loading SEO module // Because seo module used this class, and for checking class_exists function this class have to be exists // And we have to call it this but when cms and app will be one single application please remove this line new \samsoncms\app\material\form\tab\LocaleTab($renderer, $query, $entity); // Fill generic tabs $this->tabs = array(new Main($renderer, $query, $entity), new Field($renderer, $query, $entity)); $this->navigationIDs = dbQuery('structurematerial')->cond('MaterialID', $entity->id)->fields('StructureID'); // Get all another tabs if (sizeof($this->navigationIDs)) { $wysiwygFields = dbQuery('field')->cond('Type', 8)->join('structurefield')->cond('structurefield_StructureID', $this->navigationIDs)->exec(); foreach ($wysiwygFields as $field) { $this->tabs[] = new MaterialField($renderer, $query, $entity, $field); } } parent::__construct($renderer, $query, $entity); // Fire new event after creating form tabs Event::fire('samsoncms.material.form.created', array(&$this, $renderer, $query, $entity)); // Set old locales \samson\core\SamsonLocale::$locales = $locales; }
/** @inheritdoc */ public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity) { $this->tabs = array(new Main($renderer, $query, $entity), new Rights($renderer, $query, $entity)); parent::__construct($renderer, $query, $entity); }
/** @inheritdoc */ public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity) { // Add user entity tab $this->tabs = array(new Entity($renderer, $query, $entity)); parent::__construct($renderer, $query, $entity); }