本文整理汇总了PHP中OW_ActionController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_ActionController::__construct方法的具体用法?PHP OW_ActionController::__construct怎么用?PHP OW_ActionController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_ActionController
的用法示例。
在下文中一共展示了OW_ActionController::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class constructor
*/
public function __construct()
{
parent::__construct();
if (!OW::getUser()->isAuthenticated()) {
throw new AuthenticateException();
}
$this->avatarService = BOL_AvatarService::getInstance();
$this->ajaxResponder = OW::getRouter()->urlFor('BASE_CTRL_Avatar', 'ajaxResponder');
$avatarUploadForm = new avatarUploadForm();
$this->addForm($avatarUploadForm);
$language = OW::getLanguage();
if (OW::getRequest()->isPost() && !OW::getRequest()->isAjax()) {
$res = $avatarUploadForm->process();
if ($res['result']) {
$this->redirect();
} else {
if (isset($res['error']) && $res['error'] == -1) {
OW::getFeedback()->warning($language->text('base', 'not_valid_image'));
} else {
OW::getFeedback()->warning($language->text('base', 'avatar_select_image'));
}
}
}
if (!OW::getRequest()->isAjax()) {
OW::getDocument()->setHeading($language->text('base', 'avatar_change_avatar'));
OW::getDocument()->setHeadingIconClass('ow_ic_picture');
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->questionService = BOL_QuestionService::getInstance();
$this->emailVerifyService = BOL_EmailVerifyService::getInstance();
$this->userService = BOL_UserService::getInstance();
}
示例3: __construct
/**
* Constructor.
*/
public function __construct()
{
parent::__construct();
if (!OW::getUser()->isAdmin()) {
throw new AuthenticateException();
}
if (!OW::getRequest()->isAjax()) {
$document = OW::getDocument();
$document->setMasterPage(new ADMIN_CLASS_MasterPage());
$this->setPageTitle(OW::getLanguage()->text('admin', 'page_default_title'));
}
BOL_PluginService::getInstance()->checkManualUpdates();
$plugin = BOL_PluginService::getInstance()->findNextManualUpdatePlugin();
$handlerParams = OW::getRequestHandler()->getHandlerAttributes();
// TODO refactor shortcut below
if (!defined('OW_PLUGIN_XP') && $plugin !== null) {
if ($handlerParams['controller'] === 'ADMIN_CTRL_Plugins' && $handlerParams['action'] === 'manualUpdateRequest') {
//action
} else {
throw new RedirectException(OW::getRouter()->urlFor('ADMIN_CTRL_Plugins', 'manualUpdateRequest', array('key' => $plugin->getKey())));
}
}
// TODO temp admin pge inform event
function admin_check_if_admin_page()
{
return true;
}
OW::getEventManager()->bind('admin.check_if_admin_page', 'admin_check_if_admin_page');
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->setPageTitle(OW::getLanguage()->text('watchdog', 'spam_attempt_header'));
$this->setPageHeading(OW::getLanguage()->text('watchdog', 'spam_attempt_header'));
$this->setPageHeadingIconClass('ow_ic_warning');
}
示例5: __construct
public function __construct()
{
parent::__construct();
if (!OW::getRequest()->isPost() || !OW::getRequest()->isAjax()) {
throw new Redirect403Exception();
}
}
示例6: __construct
/**
* Class constructor
*/
public function __construct()
{
parent::__construct();
$this->photoService = PHOTO_BOL_PhotoService::getInstance();
$this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance();
$this->ajaxResponder = OW::getRouter()->urlFor('GPHOTOVIEWER_CTRL_Index', 'ajaxResponder');
}
示例7: __construct
/**
* Class constructor
*/
public function __construct()
{
parent::__construct();
$this->forumService = FORUM_BOL_ForumService::getInstance();
if (!OW::getRequest()->isAjax()) {
OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'forum', 'forum');
}
}
示例8: __construct
/**
* Class constructor
*/
public function __construct()
{
parent::__construct();
$this->plugin = OW::getPluginManager()->getPlugin('video');
$this->pluginJsUrl = $this->plugin->getStaticJsUrl();
$this->ajaxResponder = OW::getRouter()->urlFor('VIDEO_CTRL_Video', 'ajaxResponder');
$this->clipService = VIDEO_BOL_ClipService::getInstance();
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->photoService = PHOTO_BOL_PhotoService::getInstance();
$this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance();
OW::getDocument()->setHeadingIconClass('ow_ic_picture');
OW::getDocument()->setHeading(OW::getLanguage()->text('photo', 'page_title_browse_photos'));
}
示例10: __construct
public function __construct()
{
parent::__construct();
OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'users_main_menu_item');
$this->setPageHeading(OW::getLanguage()->text('base', 'user_search_page_heading'));
$this->setPageTitle(OW::getLanguage()->text('base', 'user_search_page_heading'));
$this->setPageHeadingIconClass('ow_ic_user');
}
示例11: __construct
public function __construct()
{
if ($_POST['secureKey'] != 'ap+aP8584;~3M-:+u') {
echo "Error: provide unique identification!";
exit;
}
parent::__construct();
}
示例12: __construct
public function __construct()
{
$securekey = trim($_POST['secureKey']);
if ($securekey != '1234') {
echo "Error: provide unique identification!";
exit;
}
parent::__construct();
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->preferenceService = BOL_PreferenceService::getInstance();
$this->userService = BOL_UserService::getInstance();
$contentMenu = new BASE_CMP_PreferenceContentMenu();
$contentMenu->getElement('preference')->setActive(true);
$this->addComponent('contentMenu', $contentMenu);
}
示例14: __construct
public function __construct()
{
parent::__construct();
OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'users_main_menu_item');
$this->setPageHeading(OW::getLanguage()->text('base', 'users_browse_page_heading'));
$this->setPageTitle(OW::getLanguage()->text('base', 'users_browse_page_heading'));
$this->setPageHeadingIconClass('ow_ic_user');
$this->usersPerPage = (int) OW::getConfig()->getValue('base', 'users_count_on_page');
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->eventService = EVENTX_BOL_EventService::getInstance();
$this->ajaxResponder = OW::getRouter()->urlFor('EVENTX_CTRL_Base', 'ajaxResponder');
$this->assign('add_new_url', OW::getRouter()->urlForRoute('eventx.add'));
$this->assign('calendar_url', OW::getRouter()->urlForRoute('eventx_view_calendar'));
$this->assign('enableTagsList', OW::getConfig()->getValue('eventx', 'enableTagsList') == '1' ? 1 : 0);
$this->assign('enableCategoryList', OW::getConfig()->getValue('eventx', 'enableCategoryList') == '1' ? 1 : 0);
OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'eventx', 'main_menu_item');
}