addElement('text', 'title', array('label' => 'Title', 'required' => true, 'maxLength' => 150)); $this->getElement('title')->addFilter('StringTrim'); $this->_initMetaTitleElement( [ 'description' => 'This information will show in the browser tab and in search results. ' . 'If you leave this field empty - the Page Title will be the same as Title.' ] ); $this->addElement( 'pageAlias', 'alias', array( 'label' => 'Alias', 'required' => true, 'maxlength' => 200, 'sourceField' => 'title', 'aliasValidatorOptions' => array( 'table' => new \Qs_Db_Table('PostCategory'), 'column' => 'alias', 'currentId' => $this->_getData('id') ) ) ); $this->addElement('checkbox', 'enabled', array('label' => 'Show on user end', 'decoration' => 'simple')); return $this; } }