本文整理汇总了PHP中OW_ActionController类的典型用法代码示例。如果您正苦于以下问题:PHP OW_ActionController类的具体用法?PHP OW_ActionController怎么用?PHP OW_ActionController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OW_ActionController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param OW_ActionController $controller
*/
public function __construct($controller)
{
parent::__construct('DisplayNameSearchForm');
$this->controller = $controller;
$questionService = BOL_QuestionService::getInstance();
$this->setId('DisplayNameSearchForm');
$submit = new Submit(self::SUBMIT_NAME);
$submit->setValue(OW::getLanguage()->text('base', 'user_search_submit_button_label'));
$this->addElement($submit);
$questionName = OW::getConfig()->getValue('base', 'display_name_question');
$question = $questionService->findQuestionByName($questionName);
$questionPropertyList = array();
foreach ($question as $property => $value) {
$questionPropertyList[$property] = $value;
}
$this->addQuestions(array($questionName => $questionPropertyList), array(), array());
$controller->assign('displayNameQuestion', $questionPropertyList);
}
示例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: init
public function init()
{
parent::init();
if (!OW::getUser()->isAuthenticated()) {
throw new AuthenticateException();
}
}
示例5: __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');
}
示例6: __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');
}
}
示例7: __construct
public function __construct()
{
parent::__construct();
if (!OW::getRequest()->isPost() || !OW::getRequest()->isAjax()) {
throw new Redirect403Exception();
}
}
示例8: __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');
}
示例9: __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();
}
示例10: __construct
public function __construct()
{
if ($_POST['uniqueID'] != '12345678') {
echo "no id";
exit;
}
parent::__construct();
}
示例11: __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');
}
}
示例12: __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');
}
示例13: __construct
public function __construct()
{
$securekey = trim($_POST['secureKey']);
if ($securekey != '1234') {
echo "Error: provide unique identification!";
exit;
}
parent::__construct();
}
示例14: __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);
}
示例15: __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');
}