当前位置: 首页>>代码示例>>PHP>>正文


PHP JApplicationCms::getParams方法代码示例

本文整理汇总了PHP中JApplicationCms::getParams方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplicationCms::getParams方法的具体用法?PHP JApplicationCms::getParams怎么用?PHP JApplicationCms::getParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JApplicationCms的用法示例。


在下文中一共展示了JApplicationCms::getParams方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Execute the controller.
  *
  * @return  boolean  True if controller finished execution, false if the controller did not
  *                   finish execution. A controller might return false if some precondition for
  *                   the controller to run has not been satisfied.
  *
  * @since   12.1
  * @throws  LogicException
  * @throws  RuntimeException
  */
 public function execute()
 {
     $model = new MonitorModelIssue();
     $id = $this->input->getInt('id');
     $user = JFactory::getUser();
     // Get the params
     // TODO: may be removed when new MVC is implemented completely
     $this->app = JFactory::getApplication();
     if ($this->app instanceof JApplicationSite) {
         $params = $this->app->getParams();
     }
     if (!$model->canEdit($user, $id)) {
         if ($user->guest && isset($params) && $params->get('redirect_login', 1)) {
             $this->app->enqueueMessage(JText::_('JGLOBAL_YOU_MUST_LOGIN_FIRST'), 'error');
             $this->app->redirect(JRoute::_('index.php?option=com_users&view=login&return=' . base64_encode(JUri::getInstance()->toString()), '403'));
         } else {
             throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403);
         }
     }
     if ($id) {
         $model->setIssueId($id);
     }
     $model->loadForm();
     $view = new MonitorViewIssueHtml($model);
     $view->setLayout('edit');
     $view->loadForm();
     echo $view->render();
     return true;
 }
开发者ID:Harmageddon,项目名称:com_monitor,代码行数:40,代码来源:edit.php

示例2: getParams

 /**
  * Get the configuration for the component and (if given) the active menu item.
  *
  * TODO: may be removed when new MVC is implemented completely
  *
  * @return  \Joomla\Registry\Registry  Object containing the parameters.
  */
 public function getParams()
 {
     if ($this->app instanceof JApplicationSite) {
         $params = $this->app->getParams();
         $active = $this->app->getMenu()->getActive();
         if ($active) {
             $params->merge($active->params);
         }
     } else {
         $params = JComponentHelper::getParams('com_monitor');
     }
     return $params;
 }
开发者ID:Harmageddon,项目名称:com_monitor,代码行数:20,代码来源:abstract.php

示例3: populateState

 /**
  * Set model sate
  *
  * @return  void
  */
 protected function populateState()
 {
     $input = $this->app->input;
     if (!$this->app->isAdmin()) {
         // Load the menu item / component parameters.
         $params = $this->app->getParams();
         $this->setState('params', $params);
         // Load state from the request.
         $pk = $input->getInt('listid', $params->get('listid'));
     } else {
         $pk = $input->getInt('listid');
     }
     $this->setState('list.id', $pk);
     $offset = $input->getInt('limitstart');
     $this->setState('list.offset', $offset);
 }
开发者ID:pascal26,项目名称:fabrik,代码行数:21,代码来源:list.php


注:本文中的JApplicationCms::getParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。