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


PHP JControllerLegacy::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     // Get project id.
     $this->projectId = $this->input->getUint('pid');
     // Prepare log object
     $registry = Joomla\Registry\Registry::getInstance('com_crowdfunding');
     /** @var  $registry Joomla\Registry\Registry */
     $fileName = $registry->get('logger.file');
     $tableName = $registry->get('logger.table');
     $file = JPath::clean($this->app->get('log_path') . DIRECTORY_SEPARATOR . $fileName);
     $this->log = new Prism\Log\Log();
     $this->log->addAdapter(new Prism\Log\Adapter\Database(JFactory::getDbo(), $tableName));
     $this->log->addAdapter(new Prism\Log\Adapter\File($file));
     // Create an object that contains a data used during the payment process.
     $this->paymentProcessContext = Crowdfunding\Constants::PAYMENT_SESSION_CONTEXT . $this->projectId;
     $this->paymentProcess = $this->app->getUserState($this->paymentProcessContext);
     // Prepare context
     $filter = new JFilterInput();
     $paymentService = JString::trim(JString::strtolower($this->input->getCmd('payment_service')));
     $paymentService = $filter->clean($paymentService, 'ALNUM');
     $this->context = JString::strlen($paymentService) > 0 ? 'com_crowdfunding.notify.' . $paymentService : 'com_crowdfunding.notify';
     // Prepare params
     $this->params = JComponentHelper::getParams('com_crowdfunding');
 }
開發者ID:bellodox,項目名稱:CrowdFunding,代碼行數:26,代碼來源:notifier.raw.php

示例2: array

 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('add', 'edit');
     checkAccessController("orders");
     addSubmenu("orders");
 }
開發者ID:ngogiangthanh,項目名稱:damtvnewversion,代碼行數:7,代碼來源:orders.php

示例3: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // Register Extra task
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
 }
開發者ID:JKoelman,項目名稱:JEM-3,代碼行數:10,代碼來源:attendees.php

示例4:

 function __construct()
 {
     parent::__construct();
     $view = $this->input->get('view', 'uploadform');
     $layout = $this->input->get('layout', '');
     $this->setRedirect(JRoute::_('index.php?option=com_fileuploadform' . (!empty($view) ? '&view=' . $view : '') . (!empty($layout) ? '&layout=' . $layout : ''), false));
 }
開發者ID:sankam-nikolya,項目名稱:FileUploadForm,代碼行數:7,代碼來源:uploadform.php

示例5: __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

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_rsmembership/tables');
     $document = JFactory::getDocument();
     $config = RSMembershipConfig::getInstance();
     $version = (string) new RSMembershipVersion();
     // Load our CSS
     $document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/rsmembership.css?v=' . $version);
     // Load our JS
     $document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/rsmembership.js?v=' . $version);
     if (!RSMembershipHelper::isJ3()) {
         // Load 2.5 CSS
         $document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/j2.css?v=' . $version);
         // Load Bootstrap on 2.5.x
         if ($config->get('load_bootstrap')) {
             $document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/bootstrap.min.css?v=' . $version);
             $document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/jquery.min.js?v=' . $version);
             $document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/jquery.noconflict.js?v=' . $version);
             $document->addScript(JUri::root(true) . '/components/com_rsmembership/assets/js/bootstrap.min.js?v=' . $version);
         }
     } else {
         // Load 3.x CSS
         $document->addStyleSheet(JUri::root(true) . '/components/com_rsmembership/assets/css/j3.css?v=' . $version);
         // Load Bootstrap on 3.x
         if ($config->get('load_bootstrap')) {
             JHtml::_('bootstrap.framework');
         }
     }
 }
開發者ID:JozefAB,項目名稱:qk,代碼行數:30,代碼來源:controller.php

示例7:

 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

示例8: array

 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_db = JFactory::getDBO();
     // Register Extra tasks
     $this->registerTask('apply', 'save');
     // turnierid
     $this->id = JRequest::getInt('id');
     $clmAccess = clm_core::$access;
     $row = JTable::getInstance('turniere', 'TableCLM');
     $row->load($this->id);
     echo "<br>invrow: ";
     var_dump($row);
     //$tournament = new CLMTournament($this->id, true);
     //die('    tinvite');
     //if (!$tournament->checkAccess(0,0,$row->tl)) {
     if ($row->tl != clm_core::$access->getJid() and $clmAccess->access('BE_tournament_edit_detail') !== false and $clmAccess->access('BE_tournament_edit_detail') !== true) {
         JError::raiseWarning(500, JText::_('TOURNAMENT_NO_ACCESS'));
         $this->adminLink = new AdminLink();
         $this->adminLink->view = "turmain";
         $this->adminLink->makeURL();
         $this->setRedirect($this->adminLink->url);
     }
     $this->adminLink = new AdminLink();
     $this->adminLink->view = "turinvite";
     $this->adminLink->more = array('id' => $this->id);
 }
開發者ID:kbaerthel,項目名稱:com_clm,代碼行數:27,代碼來源:turinvite.php

示例9:

 function __construct()
 {
     parent::__construct();
     $this->registerTask('send1', 'send');
     $this->registerTask('send2', 'send');
     $this->_app = JFactory::getApplication();
 }
開發者ID:vstorm83,項目名稱:propertease,代碼行數:7,代碼來源:controller.php

示例10:

 function __construct()
 {
     parent::__construct();
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->_input = JFactory::getApplication()->input;
 }
開發者ID:kJluk,項目名稱:EFSEO-Easy-Frontend-SEO,代碼行數:7,代碼來源:entry.php

示例11: elseif

    function __construct()
    {
        parent::__construct();
        $ajax_req = JRequest::getVar("no_html", 0, "request");
        $squeeze = JRequest::getVar("sbox", 0, "request");
        $squeeze2 = JRequest::getVar("tmpl", 0, "request");
        $task = JRequest::getVar("task");
        $export = JRequest::getVar("export", "");
        $export1 = JRequest::getVar("export1", "");
        if ($export != "" || $export1 != "") {
            // do nothing
        } elseif (!$ajax_req && $task != "savesbox" && $task != "save2" && $task != "export_button" && $task != "export" && $task != "savequizzes" && $task != "savequestionedit" && $task != "savequestion") {
            $document = JFactory::getDocument();
            $document->addStyleSheet("components/com_guru/css/general.css");
            $document->addStyleSheet("components/com_guru/css/tmploverride.css");
            $document->addStyleSheet('components/com_guru/css/bootstrap.min.css');
            $document->addStyleSheet('components/com_guru/css/font-awesome.min.css');
            $document->addStyleSheet('components/com_guru/css/ace-fonts.css');
            $document->addStyleSheet('components/com_guru/css/ace.min.css');
            $document->addStyleSheet('components/com_guru/css/fullcalendar.css');
            $document->addStyleSheet('components/com_guru/css/g_admin_modal.css');
            require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'chtmlinput.php';
            $view = $this->getView('guruDtree', 'html');
            if (!$squeeze2 && !$squeeze) {
                ?>
	  		
			<?php 
                $view->showDtree();
                ?>
					
			<?php 
            }
        }
    }
開發者ID:JozefAB,項目名稱:qk,代碼行數:34,代碼來源:controller.php

示例12: __construct

 public function __construct(array $config)
 {
     parent::__construct($config);
     $option = JRequest::getVar('option');
     $clearName = substr($option, 4);
     $this->default_view = $clearName . 's';
 }
開發者ID:baxri,項目名稱:presents,代碼行數:7,代碼來源:controller.php

示例13: array

 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('add', 'display');
     $this->registerTask('edit', 'display');
     $this->registerTask('apply', 'save');
 }
開發者ID:jdrzaic,項目名稱:joomla-dummy,代碼行數:7,代碼來源:controller.php

示例14: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     /** @var $app JApplicationSite */
     // Get project id.
     $this->projectId = $this->input->getUint('pid');
     // Prepare log object
     $registry = JRegistry::getInstance('com_crowdfunding');
     /** @var  $registry Joomla\Registry\Registry */
     $fileName = $registry->get('logger.file');
     $tableName = $registry->get('logger.table');
     $file = JPath::clean($this->app->get('log_path') . DIRECTORY_SEPARATOR . $fileName);
     $this->log = new Prism\Log\Log();
     $this->log->addAdapter(new Prism\Log\Adapter\Database(JFactory::getDbo(), $tableName));
     $this->log->addAdapter(new Prism\Log\Adapter\File($file));
     // Create an object that contains a data used during the payment process.
     $this->paymentProcessContext = Crowdfunding\Constants::PAYMENT_SESSION_CONTEXT . $this->projectId;
     $this->paymentProcess = $this->app->getUserState($this->paymentProcessContext);
     // Set payment service name.
     if (!isset($this->paymentProcess->paymentService)) {
         $this->paymentProcess->paymentService = '';
     }
     // Local executing tasks. It needs to provide form token.
     $this->registerTask('checkout', 'process');
     // Remote executing tasks. It does not need to provide form token.
     $this->registerTask('doCheckout', 'process');
     $this->registerTask('completeCheckout', 'process');
 }
開發者ID:bellodox,項目名稱:CrowdFunding,代碼行數:29,代碼來源:payments.php

示例15: array

 function __construct($config = array())
 {
     parent::__construct($config);
     JPluginHelper::importPlugin('jshoppingcheckout');
     JPluginHelper::importPlugin('jshoppingorder');
     JDispatcher::getInstance()->trigger('onConstructJshoppingControllerUser', array(&$this));
 }
開發者ID:JexyRu,項目名稱:jshop-updates,代碼行數:7,代碼來源:user.php


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