Source for file controller.php

Documentation is available at controller.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_checkin
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Checkin Controller
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_checkin
  17.  * @since       1.6
  18.  */
  19. {
  20.     public function display($cachable false$urlparams false)
  21.     {
  22.         // Load the submenu.
  23.         $this->addSubmenu($this->input->getWord('option''com_checkin'));
  24.  
  25.         parent::display();
  26.  
  27.         return $this;
  28.     }
  29.  
  30.     public function checkin()
  31.     {
  32.         // Check for request forgeries
  33.         JSession::checkToken(or jexit(JText::_('JInvalid_Token'));
  34.  
  35.         $ids $this->input->get('cid'array()'array');
  36.  
  37.         if (empty($ids))
  38.         {
  39.             JError::raiseWarning(500JText::_('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'));
  40.         }
  41.         else
  42.         {
  43.             // Get the model.
  44.             $model $this->getModel();
  45.  
  46.             // Checked in the items.
  47.             $this->setMessage(JText::plural('COM_CHECKIN_N_ITEMS_CHECKED_IN'$model->checkin($ids)));
  48.         }
  49.  
  50.         $this->setRedirect('index.php?option=com_checkin');
  51.     }
  52.  
  53.     /**
  54.      * Configure the Linkbar.
  55.      *
  56.      * @param   string  $vName  The name of the active view.
  57.      *
  58.      * @return  void 
  59.      *
  60.      * @since   1.6
  61.      */
  62.     protected function addSubmenu($vName)
  63.     {
  64.         JHtmlSidebar::addEntry(
  65.             JText::_('JGLOBAL_SUBMENU_CHECKIN'),
  66.             'index.php?option=com_checkin',
  67.             $vName == 'com_checkin'
  68.         );
  69.  
  70.         JHtmlSidebar::addEntry(
  71.             JText::_('JGLOBAL_SUBMENU_CLEAR_CACHE'),
  72.             'index.php?option=com_cache',
  73.             $vName == 'cache'
  74.         );
  75.         JHtmlSidebar::addEntry(
  76.             JText::_('JGLOBAL_SUBMENU_PURGE_EXPIRED_CACHE'),
  77.             'index.php?option=com_cache&view=purge',
  78.             $vName == 'purge'
  79.         );
  80.     }
  81. }

Documentation generated on Tue, 19 Nov 2013 14:57:23 +0100 by phpDocumentor 1.4.3