本文整理汇总了PHP中ActionController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ActionController::__construct方法的具体用法?PHP ActionController::__construct怎么用?PHP ActionController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionController
的用法示例。
在下文中一共展示了ActionController::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
$this->ops_theme = __CA_THEME__;
// get current theme
if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) {
// if theme is not defined for this plugin, try to use "default" theme
$this->ops_theme = 'default';
}
parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views'));
MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css');
$this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf');
if (!(bool) $this->opo_plugin_config->get('enabled')) {
die(_t('eastend plugin is not enabled'));
}
// redirect user if not logged in
if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
$this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
}
if ($this->request->config->get("dont_enforce_access_settings")) {
$this->opa_access_values = array();
} else {
$this->opa_access_values = caGetUserAccessValues($this->request);
}
$this->view->setVar('access_values', $va_access_values);
$this->opo_result_context = new ResultContext($po_request, 'ca_objects', ResultContext::getLastFind($po_request, 'ca_objects'));
JavascriptLoadManager::register('cycle');
}
示例2: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
$this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
}
}
示例3: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
$this->ops_theme = __CA_THEME__;
// get current theme
if (!is_dir(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views')) {
// if theme is not defined for this plugin, try to use "default" theme
$this->ops_theme = 'default';
}
parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views'));
$this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/MetabolicChronology/conf/Chronology.conf');
if (!(bool) $this->opo_plugin_config->get('enabled')) {
die(_t('Metabolic Chronology plugin is not enabled'));
}
$this->_initView($pa_options);
$this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'MetabolicChronology');
MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/MetabolicChronology/themes/" . $this->ops_theme . "/css/chronology.css", 'text/css');
JavascriptLoadManager::register('jcarousel');
JavascriptLoadManager::register('maps');
$t_list = new ca_lists();
$this->opn_silo_type_id = $t_list->getItemIDFromList('collection_types', 'silo');
$this->opn_action_type_id = $t_list->getItemIDFromList('occurrence_types', 'action');
$this->opn_context_type_id = $t_list->getItemIDFromList('occurrence_types', 'context');
$this->opn_yes_list_id = $t_list->getItemIDFromList('yes_no', 'yes');
$t_relationship_types = new ca_relationship_types();
$this->opn_rel_type_action_display_image = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "display");
$this->opn_rel_type_action_secondary_images = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "secondary");
$va_access_values = caGetUserAccessValues($this->request);
$this->opa_access_values = $va_access_values;
$this->view->setVar('access_values', $va_access_values);
}
示例4: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
// Reload user preferences config to reflect current user locale. Initial load of config file is prior to setting of preferred locale
// (which requires loading of user preferences...) and does not reflect user's preferred language.
$this->request->user->loadUserPrefDefs(true);
}
示例5: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
$this->ops_theme = __CA_THEME__;
// get current theme
if (!is_dir(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views')) {
// if theme is not defined for this plugin, try to use "default" theme
$this->ops_theme = 'default';
}
parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views'));
$this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/NovaMuse/conf/NovaMuse.conf');
if (!(bool) $this->opo_plugin_config->get('enabled')) {
die(_t('NovaMuse plugin is not enabled'));
}
MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/NovaMuse/themes/" . $this->ops_theme . "/css/dashboard.css", 'text/css');
$this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'dashboard');
$t_list = new ca_lists();
$this->opn_member_institution_id = $t_list->getItemIDFromList('entity_types', 'member_institution');
$this->opn_individual_id = $t_list->getItemIDFromList('entity_types', 'ind');
$this->opn_family_id = $t_list->getItemIDFromList('entity_types', 'fam');
$this->opn_organization_id = $t_list->getItemIDFromList('entity_types', 'org');
$t_object = new ca_objects();
$this->opn_objectTableNum = $t_object->tableNum();
$va_access_values = caGetUserAccessValues($this->request);
$this->opa_access_values = $va_access_values;
$this->view->setVar('access_values', $va_access_values);
}
示例6: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
$this->opo_datamodel = Datamodel::load();
$this->opo_app_plugin_manager = new ApplicationPluginManager();
$this->opo_result_context = new ResultContext($po_request, $this->ops_table_name, ResultContext::getLastFind($po_request, $this->ops_table_name));
}
示例7: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
if (!$this->request->isLoggedIn()) {
$this->response->setRedirect($this->request->config->get('error_display_url') . '/n/2320?r=' . urlencode($this->request->getFullUrlPath()));
return;
}
}
示例8: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
$this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
}
caSetPageCSSClasses(array("staticPage"));
}
示例9: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
//if (!$this->request->isLoggedIn() || !$this->request->user->canDoAction('can_do_search_reindex')) {
// $this->response->setRedirect($this->request->config->get('error_display_url').'/n/2320?r='.urlencode($this->request->getFullUrlPath()));
// return;
//}
}
示例10: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
AssetLoadManager::register('bundleableEditor');
AssetLoadManager::register('panel');
parent::__construct($po_request, $po_response, $pa_view_paths);
$this->opo_datamodel = Datamodel::load();
$this->opo_app_plugin_manager = new ApplicationPluginManager();
$this->cleanOldExportFilesFromTmpDir();
}
示例11: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
$this->opo_client_services_config = Configuration::load($this->request->config->get('client_services_config'));
$this->view->setVar('client_services_config', $this->opo_client_services_config);
JavascriptLoadManager::register("panel");
JavascriptLoadManager::register('cycle');
JavascriptLoadManager::register('bundleableEditor');
}
示例12: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
$this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
}
$this->opa_access_values = caGetUserAccessValues($po_request);
caSetPageCSSClasses(array("listing"));
}
示例13: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
JavascriptLoadManager::register('bundleListEditorUI');
JavascriptLoadManager::register('panel');
$this->opo_datamodel = Datamodel::load();
$this->opo_app_plugin_manager = new ApplicationPluginManager();
$this->opo_result_context = new ResultContext($po_request, $this->ops_table_name, ResultContext::getLastFind($po_request, $this->ops_table_name));
}
示例14: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
if ($this->ops_search_class) {
require_once __CA_LIB_DIR__ . "/ca/Search/" . $this->ops_search_class . ".php";
}
require_once __CA_MODELS_DIR__ . "/" . $this->ops_table_name . ".php";
parent::__construct($po_request, $po_response, $pa_view_paths);
$this->opo_item_instance = new $this->ops_table_name();
}
示例15: __construct
public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
{
parent::__construct($po_request, $po_response, $pa_view_paths);
$this->opo_library_services_config = caGetLibraryServicesConfiguration();
if (!$this->request->isLoggedIn() || !$this->request->user->canDoAction('can_do_library_checkout') || !$this->request->config->get('enable_library_services') || !$this->request->config->get('enable_object_checkout')) {
$this->response->setRedirect($this->request->config->get('error_display_url') . '/n/2320?r=' . urlencode($this->request->getFullUrlPath()));
return;
}
}