本文整理汇总了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');
}
示例2: array
function __construct($config = array())
{
parent::__construct($config);
$this->registerTask('add', 'edit');
checkAccessController("orders");
addSubmenu("orders");
}
示例3: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
// Register Extra task
$this->registerTask('add', 'edit');
$this->registerTask('apply', 'save');
}
示例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));
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->useSSL = VmConfig::get('useSSL', 0);
$this->useXHTML = false;
VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
}
示例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');
}
}
}
示例7:
function __construct()
{
parent::__construct();
$this->_db = JFactory::getDBO();
$doc = JFactory::getDocument();
$doc->addScript(JURI::root(true) . '/components/com_rsform/assets/js/script.js');
}
示例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);
}
示例9:
function __construct()
{
parent::__construct();
$this->registerTask('send1', 'send');
$this->registerTask('send2', 'send');
$this->_app = JFactory::getApplication();
}
示例10:
function __construct()
{
parent::__construct();
$this->registerTask('add', 'edit');
$this->registerTask('apply', 'save');
$this->_input = JFactory::getApplication()->input;
}
示例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
}
}
}
示例12: __construct
public function __construct(array $config)
{
parent::__construct($config);
$option = JRequest::getVar('option');
$clearName = substr($option, 4);
$this->default_view = $clearName . 's';
}
示例13: array
function __construct($config = array())
{
parent::__construct($config);
$this->registerTask('add', 'display');
$this->registerTask('edit', 'display');
$this->registerTask('apply', 'save');
}
示例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');
}
示例15: array
function __construct($config = array())
{
parent::__construct($config);
JPluginHelper::importPlugin('jshoppingcheckout');
JPluginHelper::importPlugin('jshoppingorder');
JDispatcher::getInstance()->trigger('onConstructJshoppingControllerUser', array(&$this));
}