當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JController::__construct方法代碼示例

本文整理匯總了PHP中JController::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP JController::__construct方法的具體用法?PHP JController::__construct怎麽用?PHP JController::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JController的用法示例。


在下文中一共展示了JController::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 /**
  * constructor (registers additional tasks to methods)
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     // Register Extra tasks
     $this->registerTask('add', 'edit');
     $this->registerTask('unpublish', 'publish');
 }
開發者ID:xenten,項目名稱:swift-kanban,代碼行數:11,代碼來源:download.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param	array An optional associative array of configuration settings.
  * @see		JController
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
 }
開發者ID:joebushi,項目名稱:joomla,代碼行數:13,代碼來源:plugins.php

示例3: array

 /**
  * Constructor
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     // Register Extra tasks
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
 }
開發者ID:RangerWalt,項目名稱:ecci,代碼行數:10,代碼來源:client.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('apply', 'save');
     $this->registerTask('save2new', 'save');
     $this->registerTask('save2copy', 'save');
 }
開發者ID:joebushi,項目名稱:joomla,代碼行數:10,代碼來源:article.php

示例5:

 function __construct()
 {
     parent::__construct();
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('feature', 'toggleFeature');
     $this->registerTask('unfeature', 'toggleFeature');
 }
開發者ID:Rayvid,項目名稱:joomla-jobboard,代碼行數:7,代碼來源:jobs.php

示例6: __construct

 /**
  * Constructor.
  *
  * @param   array  $config  An optional associative array of configuration settings.
  *
  * @see     JController
  * @since   11.1
  * @throws  Exception
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     // Define standard task mappings.
     // Value = 0
     $this->registerTask('unpublish', 'publish');
     // Value = 2
     $this->registerTask('archive', 'publish');
     // Value = -2
     $this->registerTask('trash', 'publish');
     // Value = -3
     $this->registerTask('report', 'publish');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
     // Guess the option as com_NameOfController.
     if (empty($this->option)) {
         $this->option = 'com_' . strtolower($this->getName());
     }
     // Guess the JText message prefix. Defaults to the option.
     if (empty($this->text_prefix)) {
         $this->text_prefix = strtoupper($this->option);
     }
     // Guess the list view as the suffix, eg: OptionControllerSuffix.
     if (empty($this->view_list)) {
         $r = null;
         if (!preg_match('/(.*)Controller(.*)/i', get_class($this), $r)) {
             throw new Exception(JText::_('JLIB_APPLICATION_ERROR_CONTROLLER_GET_NAME'), 500);
         }
         $this->view_list = strtolower($r[2]);
     }
 }
開發者ID:nirmalgyanwali,項目名稱:joomla-platform,代碼行數:40,代碼來源:admin.php

示例7: __construct

 public function __construct($config = array())
 {
     if (empty($config['default_task'])) {
         $config['default_task'] = 'index';
     }
     parent::__construct($config);
 }
開發者ID:richardzcode,項目名稱:jofe,代碼行數:7,代碼來源:controller.php

示例8: __construct

 public function __construct($default = array())
 {
     parent::__construct($default);
     JRequest::setVar('view', 'sample_catalog');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
 }
開發者ID:jaanusnurmoja,項目名稱:redjoomla,代碼行數:7,代碼來源:sample_catalog.php

示例9: LinkrController

 function LinkrController()
 {
     parent::__construct();
     // Include paths
     $this->addViewPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'views');
     $this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'models');
 }
開發者ID:jtresca,項目名稱:nysurveyor,代碼行數:7,代碼來源:controller.php

示例10: array

 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('installcore', 'display');
     $this->registerTask('installtheme', 'display');
     $this->registerTask('installsuccessfully', 'display');
 }
開發者ID:sangkasi,項目名稱:joomla,代碼行數:7,代碼來源:installer.php

示例11: array

 /**
  * Custom Constructor
  */
 function __construct($default = array())
 {
     // Set a default view if none exists
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'projects');
     }
     $task = JRequest::getVar('task');
     $searchType = JRequest::getVar('searchType', '');
     $id = JRequest::getInt('id', 0);
     parent::__construct($default);
     /*if ( $id )
     		{
     			// view property detail
     			$this->viewDetail($id );
     		}
     		else
     		{
     			if ( $task == 'search' && $searchType != 'filter')
     			{
     				// remove session of before search
     				unset( $_SESSION['projectSearch'] );
     			}
     			$this->searchProject();
     		}*/
 }
開發者ID:omarmm,項目名稱:MangLuoiBDS,代碼行數:28,代碼來源:projects.php

示例12: __construct

 /**
  * Constructor for the tasker
  *
  * @return joomfishTasker
  */
 public function __construct()
 {
     parent::__construct();
     $this->registerDefaultTask('show');
     $this->act = JRequest::getVar('act', '');
     $this->task = JRequest::getVar('task', '');
     $this->cid = JRequest::getVar('cid', array(0));
     if (!is_array($this->cid)) {
         $this->cid = array(0);
     }
     $this->fileCode = JRequest::getVar('fileCode', '');
     $this->_joomfishManager = JoomFishManager::getInstance();
     $this->registerTask('show', 'showCElementConfig');
     $this->registerTask('detail', 'showElementConfiguration');
     $this->registerTask('remove', 'removeContentElement');
     $this->registerTask('remove_install', 'removeContentElement');
     $this->registerTask('installer', 'showContentElementsInstaller');
     $this->registerTask('uploadfile', 'installContentElement');
     // Populate data used by controller
     global $mainframe;
     $this->_catid = $mainframe->getUserStateFromRequest('selected_catid', 'catid', '');
     $this->_select_language_id = $mainframe->getUserStateFromRequest('selected_lang', 'select_language_id', '-1');
     $this->_language_id = JRequest::getVar('language_id', $this->_select_language_id);
     $this->_select_language_id = $this->_select_language_id == -1 && $this->_language_id != -1 ? $this->_language_id : $this->_select_language_id;
     // Populate common data used by view
     // get the view
     $this->view = $this->getView("elements");
     // Assign data for view
     $this->view->assignRef('catid', $this->_catid);
     $this->view->assignRef('select_language_id', $this->_select_language_id);
     $this->view->assignRef('task', $this->task);
     $this->view->assignRef('act', $this->act);
 }
開發者ID:JoomFish,項目名稱:joomfish-2.2,代碼行數:38,代碼來源:elements.php

示例13: __construct

 public function __construct($default = array())
 {
     parent::__construct($default);
     // init vars
     $this->joomla = JFactory::getApplication();
     $this->user = JFactory::getUser();
     $this->session = JFactory::getSession();
     $this->document = JFactory::getDocument();
     $this->dispatcher = JDispatcher::getInstance();
     $this->option = YRequest::getCmd('option');
     $this->link_base = 'index.php?option=' . $this->option;
     $this->controller = $this->getName();
     // add super administrator var to user
     $this->user->superadmin = UserHelper::isJoomlaSuperAdmin($this->user);
     // init additional admin vars
     if ($this->joomla->isAdmin()) {
         $this->baseurl = 'index.php?option=' . $this->option . '&controller=' . $this->getName();
     }
     // init additional site vars
     if ($this->joomla->isSite()) {
         $this->itemid = (int) $GLOBALS['Itemid'];
         $this->params = $this->joomla->getParams();
         $this->pathway = $this->joomla->getPathway();
     }
 }
開發者ID:bizanto,項目名稱:Hooked,代碼行數:25,代碼來源:controller.php

示例14:

 function __construct()
 {
     global $mainframe;
     parent::__construct();
     $this->registerDefaultTask('display');
     $this->registerTask('clearCache', 'clearCache');
 }
開發者ID:tamlen,項目名稱:WordBridge,代碼行數:7,代碼來源:controller.php

示例15: __construct

 /**
  * Base Controller Constructor
  *
  * @param array $config Controller initialization configuration parameters
  * @return void
  * @since 0.1
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->set('option', JRequest::getCmd('option'));
     JModel::addIncludePath(JPATH_SITE . '/components/com_api/models');
     JTable::addIncludePath(JPATH_SITE . '/components/com_api/tables');
 }
開發者ID:bizanto,項目名稱:Hooked,代碼行數:14,代碼來源:controller.php


注:本文中的JController::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。