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


PHP JControllerLegacy类代码示例

本文整理汇总了PHP中JControllerLegacy的典型用法代码示例。如果您正苦于以下问题:PHP JControllerLegacy类的具体用法?PHP JControllerLegacy怎么用?PHP JControllerLegacy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: saveSettings

 /**
  * 
  * @param type $params
  */
 public static function saveSettings($params)
 {
     $oPlugin = JchPlatformPlugin::getPlugin();
     $oPlugin->params = $params->toArray();
     $oData = new JRegistry($oPlugin);
     $aData = $oData->toArray();
     $oController = new JControllerLegacy();
     $oController->addModelPath(JPATH_ADMINISTRATOR . '/components/com_plugins/models', 'PluginsModel');
     $oPluginModel = $oController->getModel('Plugin', 'PluginsModel');
     if ($oPluginModel->save($aData) === FALSE) {
         JchOptimizeLogger::log(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $oPluginModel->getError()), $params);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:17,代码来源:plugin.php

示例2: display

 /**
  * Typical view method for MVC based architecture
  *
  * This function is provide as a default implementation, in most cases
  * you will need to override it in your own controllers.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JControllerLegacy  A JControllerLegacy object to support chaining.
  */
 public function display($cachable = false, $urlparams = array())
 {
     $input = JFactory::getApplication()->input;
     $input->set('view', $input->get('view', 'dashboard'));
     $input->set('task', $input->get('task', 'display'));
     return parent::display($cachable, $urlparams);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:18,代码来源:controller.php

示例3: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $cachable = true;
     $safeurlparams = array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD');
     parent::display($cachable, $safeurlparams);
     return $this;
 }
开发者ID:ngxuanmui,项目名称:hp3,代码行数:16,代码来源:controller.php

示例4: display

 public function display($cachable = false, $urlparams = false)
 {
     JRequest::setVar('view', JRequest::getCmd('view', 'Orphans'));
     if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "zipIt") {
         $file = tempnam("tmp", "zip");
         $zip = new ZipArchive();
         $zip->open($file, ZipArchive::OVERWRITE);
         foreach ($_POST['tozip'] as $_file) {
             $zip->addFile(JPATH_ROOT . "/" . $_file, $_file);
         }
         $zip->close();
         header('Content-Type: application/zip');
         header('Content-Length: ' . filesize($file));
         header('Content-Disposition: attachment; filename="orphans.zip"');
         readfile($file);
         unlink($file);
         die;
     } else {
         if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "delete" && isset($_POST['_confirmAction'])) {
             foreach ($_POST['tozip'] as $_file) {
                 unlink(JPATH_ROOT . "/" . $_file);
             }
         }
     }
     // call parent behavior
     parent::display($cachable);
 }
开发者ID:james-Ballyhoo,项目名称:com_orphan,代码行数:27,代码来源:controller.php

示例5: display

 public function display($cachable = false, $urlparams = array())
 {
     $viewName = $this->input->getCmd('view', 'dashboard');
     $this->input->set("view", $viewName);
     parent::display();
     return $this;
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:7,代码来源:controller.php

示例6: display

 function display($cachable = false, $urlparams = false)
 {
     switch (JRequest::getVar('task')) {
         case 'login':
             $this->LoginJUser();
             break;
         case 'create':
             $this->create_user();
             break;
         case 'create_proceed':
             $this->create_proceed();
             break;
         case 'logout':
             $this->logout();
             break;
         case 'switch':
             $this->distroy_fb_session();
             break;
         default:
             break;
     }
     switch (JRequest::getVar('view')) {
         default:
             JRequest::setVar('view', 'fbconnct');
     }
     parent::display();
 }
开发者ID:educakanchay,项目名称:educared,代码行数:27,代码来源:controller.php

示例7: array

 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('add', 'edit');
     checkAccessController("orders");
     addSubmenu("orders");
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:7,代码来源:orders.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->useSSL = VmConfig::get('useSSL', 0);
     $this->useXHTML = false;
     VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:7,代码来源:user.php

示例9: display

 function display($cachable = false, $urlparams = array())
 {
     // set default view if not set
     JRequest::setVar("view", JFactory::getApplication()->input->get("view", "Dashboard"));
     // call parent behavior
     parent::display($cachable, $urlparams);
 }
开发者ID:jehanryan,项目名称:Flotech,代码行数:7,代码来源:controller.php

示例10: display

 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController  A JController object to support chaining.
  *
  * @since	2.0
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get the document object.
     $document = JFactory::getDocument();
     // Get the input class
     $input = JFactory::getApplication()->input;
     // Set the default view name and format from the Request.
     $vName = $input->get('view', 'default', 'cmd');
     $vFormat = $document->getType();
     $lName = $input->get('layout', 'default', 'cmd');
     $id = $input->get('id', null, 'cmd');
     if ($vName == 'default') {
         $input->set('view', 'settings');
         $input->set('layout', 'base');
         $lName = $input->get('layout', 'default', 'cmd');
         $vName = 'settings';
     }
     // Check for edit form.
     if ($vName == 'item' && $lName == 'edit' && !$this->checkEditId('com_shconfig.edit.item', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_shconfig&view=items', false));
         return false;
     }
     // Add the submenu
     ShconfigHelper::addSubmenu($vName, $lName);
     parent::display($cachable, $urlparams);
     return $this;
 }
开发者ID:philbertphotos,项目名称:JMapMyLDAP,代码行数:40,代码来源:controller.php

示例11:

 function __construct()
 {
     parent::__construct();
     $this->_db = JFactory::getDBO();
     $doc = JFactory::getDocument();
     $doc->addScript(JURI::root(true) . '/components/com_rsform/assets/js/script.js');
 }
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:7,代码来源:controller.php

示例12: display

 /**
  * display task
  *
  * @return void
  */
 function display($cachable = false, $urlparams = false)
 {
     // set default view if not set
     $view = $this->input->getCmd('view', '###SITE_DEFAULT_VIEW###');
     $isEdit = $this->checkEditView($view);
     $layout = $this->input->get('layout', null, 'WORD');
     $id = $this->input->getInt('id');
     $cachable = true;
     // Check for edit form.
     if ($isEdit) {
         if ($layout == 'edit' && !$this->checkEditId('com_componentbuilder.edit.' . $view, $id)) {
             // Somehow the person just went to the form - we don't allow that.
             $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
             $this->setMessage($this->getError(), 'error');
             // check if item was opend from other then its own list view
             $ref = $this->input->getCmd('ref', 0);
             $refid = $this->input->getInt('refid', 0);
             // set redirect
             if ($refid > 0 && ComponentbuilderHelper::checkString($ref)) {
                 // redirect to item of ref
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
             } elseif (ComponentbuilderHelper::checkString($ref)) {
                 // redirect to ref
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=' . (string) $ref, false));
             } else {
                 // normal redirect back to the list default site view
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=###SITE_DEFAULT_VIEW###', false));
             }
             return false;
         }
     }
     return parent::display($cachable, $urlparams);
 }
开发者ID:vdm-io,项目名称:Joomla-Component-Builder,代码行数:38,代码来源:controller.php

示例13: display

 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/djmediatools.php';
     DJMediatoolsHelper::addSubmenu($view = JRequest::getCmd('view', 'cpanel'));
     parent::display();
     return $this;
 }
开发者ID:andremarceloteixeira,项目名称:relaixamento.com-local,代码行数:7,代码来源:controller.php

示例14: display

 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached.
  * @param   boolean  $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $cachable = true;
     /**
      * Set the default view name and format from the Request.
      * Note we are using a_id to avoid collisions with the router and the return page.
      * Frontend is a bit messier than the backend.
      */
     $id = $this->input->getInt('a_id');
     $vName = $this->input->getCmd('view', 'categories');
     $this->input->set('view', $vName);
     $user = JFactory::getUser();
     if ($user->get('id') || $this->input->getMethod() == 'POST' && ($vName == 'category' && $this->input->get('layout') != 'blog' || $vName == 'archive')) {
         $cachable = false;
     }
     $safeurlparams = array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT');
     // Check for edit form.
     if ($vName == 'form' && !$this->checkEditId('com_content.edit.article', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         return JError::raiseError(403, JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
     }
     if ($vName == 'article' && $cachable) {
         // Get/Create the model
         if ($model = $this->getModel($vName)) {
             $model->hit();
         }
     }
     parent::display($cachable, $safeurlparams);
     return $this;
 }
开发者ID:klas,项目名称:joomla-cms,代码行数:40,代码来源:controller.php

示例15: mvceditorHelper

    /**
     * objektum generálás
     */
    function __construct()
    {
        parent::__construct();
        // ============================== FIGYELEM Ha több szüro mezo van akkor át kell írni! ===================
        $this->state = JSON_decode('{
		"orderCol":"1", 
		"orderDir":"asc",
		"filterStr":"",
		"limitstart":0,
		"limit":10,
		"id":""
		}
		');
        $this->message = JSON_decode('{
		"txt":"",
		"class":"msg"
		}
	    ');
        if (file_exists(JPATH_COMPONENT . '/helpers/mvceditor.php')) {
            include_once JPATH_COMPONENT . '/helpers/mvceditor.php';
            $this->helper = new mvceditorHelper();
        }
        if (file_exists(JPATH_COMPONENT . '/helpers/components.php')) {
            include_once JPATH_COMPONENT . '/helpers/components.php';
            $this->componentHelper = new componentsHelper();
        }
    }
开发者ID:utopszkij,项目名称:lmp,代码行数:30,代码来源:components.php


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