/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.6 */ protected function populateState() { // Load the parameters. $params = JComponentHelper::getParams('com_patchtester'); $this->setState('params', $params); $this->setState('github_user', $params->get('org', 'joomla')); $this->setState('github_repo', $params->get('repo', 'joomla-cms')); parent::populateState(); }
/** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.6 */ protected function populateState() { // Initialise variables. $app = JFactory::getApplication('administrator'); $this->setState('message', $app->getUserState('com_installer.message')); $this->setState('extension_message', $app->getUserState('com_installer.extension_message')); $app->setUserState('com_installer.message', ''); $app->setUserState('com_installer.extension_message', ''); // Recall the 'Install from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.install_directory', 'install_directory', $app->getCfg('tmp_path')); $this->setState('install.directory', $path); parent::populateState(); }
/** * populateState * * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 1.6 */ protected function populateState() { /** messages **/ $this->setState('message', JFactory::getApplication()->getUserState('com_jfoobar.message')); $this->setState('extension_message', JFactory::getApplication()->getUserState('com_jfoobar.extension_message')); JFactory::getApplication()->setUserState('com_jfoobar.message', ''); JFactory::getApplication()->setUserState('com_jfoobar.extension_message', ''); /** extension type **/ $this->setState('create.createtype', JRequest::getCmd('createtype', 'component')); /** module **/ $this->setState('create.module_name', JRequest::getCmd('module_name', '')); /** plugin **/ $this->setState('create.plugin_name', JRequest::getCmd('plugin_name', '')); $this->setState('create.plugin_type', JRequest::getCmd('plugin_type', 'content')); parent::populateState(); }
/** * @param null $ordering * @param null $direction */ protected function populateState($ordering = null, $direction = null) { // Adjust the context to support modal layouts. if ($layout = JRequest::getVar('layout')) { $this->context .= '.' . $layout; } //$search = $this->getUserStateFromRequest($this->context . 'filter.published', 'filter_published'); // /$this->setState('tag.filter.search', $search); // List state information. parent::populateState('a.title', 'asc'); }