_question = $question; return $this; } public function getQuestion() { if (empty($this->_question)) { throw new Exception('Security question is empty'); } return $this->_question; } protected function _initElements() { $this->addElement('hidden', 'login'); $this->addElement('text', 'answer', ['label' => $this->getQuestion(), 'required' => true]); return $this; } protected function _initButtons() { if (!$this->_hasButtons) { return $this; } $this->addElement( 'submit', 'btnSubmit', ['label' => 'Reset Password', 'attribs' => ['class' => 'btn btn-primary']] ); return $this; } }