function __construct($config = array()) { parent::__construct($config); if (empty($this->csvFilename)) { $view = JRequest::get('view'); $this->csvFilename = strtolower($view); } }
/** * First displays the submenu, then displays the output * but only if a valid _doTask is set in the view object * * @param $tpl * @return unknown_type */ public function display($tpl = null) { // display() will return null if 'doTask' is not set by the controller // This prevents unauthorized access by bypassing the controllers if (empty($this->_doTask)) { return null; } $this->getLayoutVars($tpl); if (!JRequest::getInt('hidemainmenu') && empty($this->hidemenu)) { $this->displaySubmenu(); } $app = DSC::getApp(); $config = $app::getInstance(); if ($config->get('include_site_css', '1')) { JHTML::_('stylesheet', 'site.css', 'media/' . $this->_option . '/css/'); } parent::display($tpl); }
/** * Basic methods for displaying an item from a list * @param $tpl * @return unknown_type */ function _form($tpl = '') { $app = JFactory::getApplication(); if (empty($this->hidemenu)) { $model = $this->getModel(); // get the data $table = $model->getTable(); $table->load((int) $model->getId()); // set toolbar $layout = $this->getLayout(); $isNew = $table->id < 1; $view = ucwords(strtolower($app->input->getString('view'))); switch (strtolower($layout)) { case "view": $this->set("title", 'View ' . $view); $this->_viewToolbar($isNew); break; case "form": default: $this->set("title", 'Edit ' . $view); $this->_formToolbar($isNew); break; } } parent::_form($tpl); }