本文整理汇总了PHP中AppController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AppController::__construct方法的具体用法?PHP AppController::__construct怎么用?PHP AppController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppController
的用法示例。
在下文中一共展示了AppController::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->layout = 'painel';
$this->Funcionario = new Funcionario();
$this->Endereco = new Endereco();
}
示例2: __construct
/**
* __construct
*
* @param CakeRequest $request
* @param CakeResponse $response
*/
public function __construct($request = null, $response = null)
{
parent::__construct($request, $response);
$this->constructClasses();
$this->Components->trigger('initialize', array(&$this));
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
}
示例3: __construct
public function __construct()
{
parent::__construct();
add_filter('wp_edit_nav_menu_walker', array(&$this, 'addMenuEditWalker'), 10, 2);
add_action('wp_update_nav_menu_item', array(&$this, 'beforeSave'), 10, 3);
add_filter('wp_setup_nav_menu_item', array(&$this, 'afterFind'));
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->layout = "painel";
$this->Mesa = new Mesa();
$this->Ambiente = new Ambiente();
}
示例5: __construct
public function __construct()
{
$this->safeFunctionsU = array('chat');
$this->safeFunctions = array('chat', 'preferences', 'password', 'notifications', 'users_data');
parent::__construct();
$this->cfg['title'] = $this->lang->line('Gestión');
}
示例6: Subjects
function __construct()
{
parent::__construct();
$this->subjects = new Subjects();
$this->requirements = new GarantRequirements();
$this->helpLink = HELP_COMMON;
}
示例7: __construct
/**
* Constructor.
*
* @param Zend_Controller_Request_Abstract $request
* @param Zend_Controller_Response_Abstract $response
* @param array $invokeArgs
* @throws Zend_Exception
*/
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
{
parent::__construct($request, $response, $invokeArgs);
$this->loadModuleElements();
if (is_null($this->moduleName)) {
throw new Zend_Exception('Please set the module name in AppController');
}
$fc = Zend_Controller_Front::getInstance();
$this->view->moduleWebroot = $fc->getBaseUrl() . '/modules/' . $this->moduleName;
$this->view->moduleName = $this->moduleName;
if (file_exists(BASE_PATH . '/modules/' . $this->moduleName . '/configs/module.ini')) {
$config = new Zend_Config_Ini(BASE_PATH . '/modules/' . $this->moduleName . '/configs/module.ini', 'global', true);
} elseif (file_exists(BASE_PATH . '/privateModules/' . $this->moduleName . '/configs/module.ini')) {
$config = new Zend_Config_Ini(BASE_PATH . '/privateModules/' . $this->moduleName . '/configs/module.ini', 'global', true);
} else {
throw new Zend_Exception('Unable to find configuration file');
}
$this->view->moduleFullName = $config->fullname;
$this->view->moduleDescription = $config->description;
// Add variables to the view that allow the retrieval of any enabled module
// webroots
$allModules = Zend_Registry::get('modulesEnable');
foreach ($allModules as &$mod) {
$modWebroot = $mod . 'Webroot';
$this->view->{$modWebroot} = $fc->getBaseUrl() . '/modules/' . $mod;
}
}
示例8:
function __construct()
{
$this->name = 'search';
$this->versioning = true;
$this->base_view_dir = ROOT_DIR;
parent::__construct();
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->layout = 'painel';
$this->Email = new Email();
$this->Email->useTable = 'emails_sistema';
}
示例10: __construct
public function __construct()
{
$this->safeFunctionsU = array();
$this->safeFunctions = array('data');
parent::__construct();
$this->cfg['title'] = $this->lang->line('Productos');
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->layout = "painel";
$this->Ambiente = new Ambiente();
$this->Salao = new Salao();
}
示例12: __construct
public function __construct($default = array())
{
parent::__construct($default);
// set table
$this->table = $this->app->table->account;
// get application
$this->application = $this->app->zoo->getApplication();
// get Joomla application
$this->joomla = $this->app->system->application;
// get params
$this->params = $this->joomla->getParams();
// get pathway
$this->pathway = $this->joomla->getPathway();
// set base url
$this->baseurl = $this->app->link(array('controller' => $this->controller), false);
$this->cUser = $this->app->storeuser->get();
$this->cart = $this->app->cart;
// registers tasks
$this->registerTask('customer', 'display');
$this->registerTask('payment', 'display');
$this->registerTask('confirm', 'display');
$this->registerTask('save', 'display');
$this->registerTask('processPayment', 'display');
$this->registerTask('addCoupon', 'display');
$this->registerTask('orderNotification', 'orderNotification');
// $this->taskMap['display'] = null;
// $this->taskMap['__default'] = null;
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->css = array();
$this->js = array();
$this->User = new Usuario();
}
示例14: __construct
public function __construct()
{
$this->ClasseAllow = array('ajustaCadastros');
parent::__construct();
$this->layout = 'painel';
$this->Cliente = new Cliente();
}
示例15: __construct
/**
* @param array $app
* @param array $config
* @throws AppException
*/
public function __construct($app, $config = array())
{
parent::__construct($app, $config);
$this->_jbrequest = $this->app->jbrequest;
$task = $this->_jbrequest->getWord('task');
$ctrl = $this->_jbrequest->getCtrl();
if (!method_exists($this, $task)) {
throw new AppException('Action method not found! ' . $ctrl . ' :: ' . $task . '()');
}
// internal vars
$this->application = $this->app->zoo->getApplication();
$this->_params = $this->application->getParams('frontpage');
$this->joomla = $this->app->system->application;
$isSite = $this->app->jbenv->isSite();
if (!$isSite) {
$this->app->document->addStylesheet("root:administrator/templates/system/css/system.css");
$this->app->jbassets->uikit(true, true);
$this->_setToolbarTitle();
} else {
$this->params = $this->joomla->getParams();
$this->pathway = $this->joomla->getPathway();
$this->app->jbassets->setAppCSS();
$this->app->jbassets->setAppJS();
}
$this->_config = JBModelConfig::model();
}