public function __construct() { parent::__construct(); $this->option = JRequest::getCmd('option'); $this->view = JRequest::getCmd('view'); $this->context = $this->option . '.categories'; $this->populateState(); }
public function __construct($config = array()) { parent::__construct($config); $id = JRequest::getInt('id', false); if (!$id) { $cid = JRequest::getVar('cid', array()); $id = @$cid[0]; } if ($id) { $this->setState('id', $id); } }