BlogFactoryText::_('comments_filter_approved_option_unapproved'), 1 => BlogFactoryText::_('comments_filter_approved_option_approved'), ); } protected function getSortFields() { return array( 'c.text' => BlogFactoryText::_('comments_heading_comment'), 'c.approved' => BlogFactoryText::_('comments_heading_approved'), 'c.published' => JText::_('JSTATUS'), 'u.username' => BlogFactoryText::_('comments_heading_username'), 'c.created_at' => JText::_('JDATE'), 'c.id' => JText::_('JGRID_HEADING_ID'), ); } protected function beforeDisplay() { if (!$this->approveComments) { unset($this->buttons[array_search('approve', $this->buttons)]); unset($this->buttons[array_search('unapprove', $this->buttons)]); } parent::beforeDisplay(); } }