public function __construct() { $this->photoPlugin = OW::getPluginManager()->getPlugin('photo'); $this->photoPluginJsUrl = $this->photoPlugin->getStaticJsUrl(); $this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance(); $this->photoService = PHOTO_BOL_PhotoService::getInstance(); $this->menu = $this->getMenu(); if (!OW::getRequest()->isAjax()) { OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'photo', 'photo'); } }
/** * Class constructor */ public function __construct() { parent::__construct(); $this->plugin = OW::getPluginManager()->getPlugin('photo'); $this->pluginJsUrl = $this->plugin->getStaticJsUrl(); $this->ajaxResponder = OW::getRouter()->urlFor('PHOTO_CTRL_Photo', 'ajaxResponder'); $this->photoService = PHOTO_BOL_PhotoService::getInstance(); $this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance(); $this->menu = $this->getMenu(); if (!OW::getRequest()->isAjax()) { OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'photo', 'photo'); } }
/** * Returns an instance of class (singleton pattern implementation). * * @return OW_PluginManager */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
/** * Returns system plugin manager object. * * @return OW_PluginManager */ public static function getPluginManager() { return OW_PluginManager::getInstance(); }
* limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent * with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language * governing rights and limitations under the License. The Original Code is Oxwall software. * The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation). * All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved. * EXHIBIT B. Attribution Information * Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved. * Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software * Attribution URL: http://www.oxwall.org/ * Graphic Image as provided in the Covered Code. * Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work * which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. */ $autoloader = OW::getAutoloader(); $autoloader->addPackagePointer('MBOL', OW_PluginManager::getInstance()->getPlugin('base')->getMobileBolDir()); $router = OW::getRouter(); $router->addRoute(new OW_Route('base.not_available_in_this_context', 'not-available', 'BASE_MCTRL_BaseDocument', 'notAvailable')); $router->addRoute(new OW_Route('base.desktop_version', 'desktop-version', 'BASE_MCTRL_BaseDocument', 'redirectToDesktop')); $router->addRoute(new OW_Route('static_sign_in', 'sign-in', 'BASE_MCTRL_User', 'standardSignIn')); $router->addRoute(new OW_Route('sign_in', 'sign-in', 'BASE_MCTRL_User', 'standardSignIn')); //TODO find usage and remove $router->addRoute(new OW_Route('base_sign_out', 'sign-out', 'BASE_CTRL_User', 'signOut')); $router->addRoute(new OW_Route('base_user_profile', 'user/:username', 'BASE_MCTRL_User', 'profile')); $router->addRoute(new OW_Route('base_about_profile', 'about/:username', 'BASE_MCTRL_User', 'about')); $router->addRoute(new OW_Route('base_page_404', '404', 'BASE_MCTRL_BaseDocument', 'page404')); $router->addRoute(new OW_Route('base_page_403', '403', 'BASE_MCTRL_BaseDocument', 'page403')); $router->addRoute(new OW_Route('base_page_auth_failed', 'authorization-failed', 'BASE_MCTRL_BaseDocument', 'authorizationFailed')); $router->addRoute(new OW_Route('base_page_splash_screen', 'splash-screen', 'BASE_MCTRL_BaseDocument', 'splashScreen')); $router->addRoute(new OW_Route('base_email_verify', 'email-verify', 'BASE_MCTRL_EmailVerify', 'index')); $router->addRoute(new OW_Route('base_email_verify_code_form', 'email-verify-form', 'BASE_MCTRL_EmailVerify', 'verifyForm'));