Exemplo n.º 1
0
 /**
  * Method for display page.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get config parameters
     if (class_exists('JSNConfigHelper')) {
         $config = JSNConfigHelper::get();
         // Check if JSN Mobilize is configured correctly
         if ($config->get('link_mobile') == 'm.domain.tld' or $config->get('link_tablet') == 'tablet.domain.tld') {
             // Get application object
             $app = JFactory::getApplication();
             // Set message
             $app->enqueueMessage(JText::_('JSN_MOBILIZE_CONFIG_LINKS'));
             // Mark required parameters
             JRequest::setVar('required', array('link_mobile', 'link_tablet'));
             // Set config view
             JRequest::setVar('view', 'config');
         } else {
             // Set edit view
             JRequest::setVar('view', JRequest::getCmd('view', 'profiles'));
         }
     } else {
         // Set edit view
         JRequest::setVar('view', JRequest::getCmd('view', 'profiles'));
     }
     // Call parent method
     parent::display($cachable, $urlparams);
 }
Exemplo n.º 2
0
 /**
  * Method for display page.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     // Set default view if not set
     $input->set('view', $input->getCmd('view', 'sliders'));
     // Call parent method
     parent::display($cachable, $urlparams);
 }
Exemplo n.º 3
0
 /**
  * Typical view method for MVC based architecture
  *
  * This function is provide as a default implementation, in most cases
  * you will need to override it in your own controllers.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  A JController object to support chaining.
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     // Set default view
     $input->set('view', $input->get('view', 'form'));
     parent::display();
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Method for display page.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Check if JSN Mobilize is configured correctly
     if ($config->get('link_mobile') == 'm.domain.tld' or $config->get('link_tablet') == 'tablet.domain.tld') {
         // Redirect to configuration page
         return JFactory::getApplication()->redirect(JRoute::_('index.php?option=' . JFactory::getApplication()->input->getCmd('option')));
     } else {
         // Call parent method
         parent::display($cachable, $urlparams);
     }
 }
Exemplo n.º 5
0
 /**
  * Typical view method for MVC based architecture
  *
  * This function is provide as a default implementation, in most cases
  * you will need to override it in your own controllers.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  A JController object to support chaining.
  *
  * @since   11.1
  */
 function display($cachable = false, $urlparams = false)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     // Set default view if not set
     $input->set('view', $input->getCmd('view', 'about'));
     $vName = $input->getCmd('view', 'about');
     //Add submenus
     if (JRequest::getVar('tmpl') != 'component' && JRequest::getVar('tmpl') != 'ajax' && !JRequest::getVar('ajax') && $vName != 'installer') {
         JSNMenuHelper::addEntry('pb-submenu-manager', 'COM_PAGEBUILDER_PAGE_MANAGER', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=manager', $vName == 'manager', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-monitor.png', 'pb-submenu');
         JSNMenuHelper::addEntry('pb-submenu-configuration', 'COM_PAGEBUILDER_CONFIGURATION', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=configuration', $vName == 'configuration', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-cog.png', 'pb-submenu');
         JSNMenuHelper::addEntry('pb-submenu-about', 'COM_PAGEBUILDER_ABOUT', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=about', $vName == 'about', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-star.png', 'pb-submenu');
         // Render menu
         JSNMenuHelper::render('pb-submenu');
     }
     // Call parent method
     parent::display($cachable, $urlparams);
 }
Exemplo n.º 6
0
 /**
  * Display the page
  *
  * @param   boolean  $cachable   If true, the view output will be cached.
  * @param   array    $urlparams  An array of safe url parameters and their variable types.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Set default view
     $this->input->set('view', $this->input->getCmd('view', 'forms'));
     parent::display($cachable, $urlparams);
 }