Source for file form.php

Documentation is available at form.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_weblinks
  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. require_once JPATH_COMPONENT_ADMINISTRATOR.'/models/weblink.php';
  13.  
  14. /**
  15.  * Weblinks model.
  16.  *
  17.  * @package     Joomla.Site
  18.  * @subpackage  com_weblinks
  19.  * @since       1.6
  20.  */
  21. {
  22.     /**
  23.      * Model typeAlias string. Used for version history.
  24.      *
  25.      * @var        string 
  26.      */
  27.     public $typeAlias = 'com_weblinks.weblink';
  28.  
  29.     /**
  30.      * Get the return URL.
  31.      *
  32.      * @return  string    The return URL.
  33.      * @since   1.6
  34.      */
  35.     public function getReturnPage()
  36.     {
  37.         return base64_encode($this->getState('return_page'));
  38.     }
  39.  
  40.     /**
  41.      * Method to auto-populate the model state.
  42.      *
  43.      * Note. Calling getState in this method will result in recursion.
  44.      *
  45.      * @since   1.6
  46.      */
  47.     protected function populateState()
  48.     {
  49.         $app JFactory::getApplication();
  50.  
  51.         // Load state from the request.
  52.         $pk $app->input->getInt('w_id');
  53.         $this->setState('weblink.id'$pk);
  54.         // Add compatibility variable for default naming conventions.
  55.         $this->setState('form.id'$pk);
  56.  
  57.         $categoryId    $app->input->getInt('catid');
  58.         $this->setState('weblink.catid'$categoryId);
  59.  
  60.         $return $app->input->get('return'null'base64');
  61.  
  62.         if (!JUri::isInternal(base64_decode($return)))
  63.         {
  64.             $return null;
  65.         }
  66.  
  67.         $this->setState('return_page'base64_decode($return));
  68.  
  69.         // Load the parameters.
  70.         $params    $app->getParams();
  71.         $this->setState('params'$params);
  72.  
  73.         $this->setState('layout'$app->input->get('layout'));
  74.     }
  75. }

Documentation generated on Tue, 19 Nov 2013 15:03:38 +0100 by phpDocumentor 1.4.3