当前位置: 首页>>代码示例>>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;未经允许,请勿转载。