/** * Create header div for answers block. * This div is independant of answers * block and contains word "Answers", * count of answers and some 'sort by' * tabs * * @todo translate word 'Answer' * * @return object $this */ protected function setAnswersHeader() { $tabs = ''; /** * Does not make sense to show * any type of 'sort by' when there is * only 1 post or no posts at all * and 'sort by' required only for questions. */ if ($this->Question['i_ans'] > 1 && $this->withQuestionTag) { $cond = $this->Registry->Request->get('sort', 's', 'i_lm_ts'); $tabs = Urhere::factory($this->Registry)->get('tplAnstypes', $cond); } $aVars = array($this->Question['i_ans'], 'Post' . $this->Question['ans_s'], $tabs); $this->aPageVars['body'] .= \tplAnswersheader::parse($aVars, false); return $this; }
/** * Create header div for answers block. * This div is independent of answers * block and contains word "Answers", * count of answers and some 'sort by' * tabs * * @return object $this */ protected function setAnswersHeader() { $tabs = ''; /** * Does not make sense to show * any type of 'sort by' when there is * only 1 answer or no answers at all */ if ($this->Question['i_ans'] > 1) { $cond = $this->Router->getSegment(3, 's', $this->Registry->Ini['URI_PARTS']['SORT_RECENT']); $tabs = Urhere::factory($this->Registry)->get('tplAnstypes', $cond); } $aVars = array($this->Question['i_ans'], '@@Answer@@' . $this->Question['ans_s'], $tabs); $this->aPageVars['body'] .= \tplAnswersheader::parse($aVars, false); return $this; }