当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::getPrefixForManager方法代码示例

本文整理汇总了PHP中Manager::getPrefixForManager方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getPrefixForManager方法的具体用法?PHP Manager::getPrefixForManager怎么用?PHP Manager::getPrefixForManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager::getPrefixForManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($bShouldLogin = true)
 {
     parent::__construct();
     SanityCheck::basicCheck();
     if ($bShouldLogin && (!Session::getSession()->isAuthenticated() || !Session::getSession()->getUser()->getIsBackendLoginEnabled())) {
         LinkUtil::redirect(LinkUtil::link(array(), 'AdminManager', array('preview' => self::getRequestedPath())));
     }
     $oResourceIncluder = ResourceIncluder::defaultIncluder();
     $oResourceIncluder->addCustomJs('window.FILE_PREFIX = "' . MAIN_DIR_FE_PHP . Manager::getPrefixForManager('FileManager') . '";');
     //Fix JSON requests when using Prototype in the frontend
     $oResourceIncluder->addReverseDependency('lib_prototype', false, 'preview/prototype_json_fix.js');
     //Add jQuery and jQuery UI
     $oResourceIncluder->addJavaScriptLibrary('jquery', AdminManager::JQUERY_VERSION, null, true, null, ResourceIncluder::PRIORITY_FIRST);
     $oResourceIncluder->addJavaScriptLibrary('jqueryui', AdminManager::JQUERY_UI_VERSION);
     //Add client widget handling code
     $oResourceIncluder->addResource('widget/widget.js');
     $oResourceIncluder->addResource('widget/widget_skeleton.js');
     //Provides some basic overrides for tooltip, notifyuser and stuff
     //Override some site styles in specific regions
     $oResourceIncluder->addResource('preview/preview-reset.css');
     $oResourceIncluder->addResource('preview/preview-default.css');
     $oResourceIncluder->addResource('admin/theme/jquery-ui-1.10.2.custom.min.css');
     //Add the css that handles styles for all widgets but namespace it so it applies only to specific areas of the page (editable areas, dialogs, the admin menu, etc.)
     $this->addNamespacedCss(array('widget', 'widget.css'));
     $oResourceIncluder->addResource('backend/additions.js', null, null, null, ResourceIncluder::PRIORITY_NORMAL, null, true);
     $oResourceIncluder->addResource('preview/additions.js', null, null, null, ResourceIncluder::PRIORITY_NORMAL, null, true);
     $oResourceIncluder->addResource('backend/additions.css', null, null, null, ResourceIncluder::PRIORITY_NORMAL, null, true);
     $oResourceIncluder->addResource('preview/additions.css', null, null, null, ResourceIncluder::PRIORITY_NORMAL, null, true);
     //preview-interface.css contains things like the edit buttons
     ResourceIncluder::defaultIncluder()->addResource('preview-interface.css', null, null, null, ResourceIncluder::PRIORITY_NORMAL, null, true);
     //Include the resources of widgets we know we’re gonna use.
     if ($bShouldLogin) {
         $oLoginWindowWidget = WidgetModule::getWidget('login_window');
         LoginWindowWidgetModule::includeResources();
     }
     $this->oAdminMenuWidget = WidgetModule::getWidget('admin_menu');
     AdminMenuWidgetModule::includeResources();
     $this->oPageTypeWidget = WidgetModule::getWidget('page_type');
     PageTypeWidgetModule::includeResources();
 }
开发者ID:rapila,项目名称:cms-base,代码行数:40,代码来源:PreviewManager.php

示例2: writeManagerPrefix

 public function writeManagerPrefix($oTemplateIdentifier)
 {
     return Manager::getPrefixForManager($oTemplateIdentifier->getValue());
 }
开发者ID:rapila,项目名称:cms-base,代码行数:4,代码来源:SpecialTemplateIdentifierActions.php

示例3: link

 public static function link($mPath = false, $mManager = null, $aParameters = array(), $mLanguage = null, $bIncludeLanguage = null)
 {
     if ($mPath === null) {
         // Respect null-links
         return null;
     }
     if (!$mPath) {
         $mPath = array();
     }
     if (!is_array($mPath)) {
         $mPath = explode("/", $mPath);
     }
     $mManager = Manager::getManagerClassNormalized($mManager);
     $sPrefix = Manager::getPrefixForManager($mManager);
     if ($mLanguage === true || $mLanguage === false) {
         $bIncludeLanguage = $mLanguage;
         $mLanguage = null;
     }
     if ($bIncludeLanguage === null) {
         $bIncludeLanguage = $mManager::shouldIncludeLanguageInLink();
     }
     if ($bIncludeLanguage) {
         if ($mLanguage === null) {
             $mLanguage = Session::language(true);
         }
         if ($mLanguage instanceof Language) {
             array_unshift($mPath, $mLanguage->getPathPrefix());
         } else {
             if (is_string($mLanguage)) {
                 $mLanguage = LanguageQuery::create()->findPk($mLanguage)->getPathPrefix();
                 array_unshift($mPath, $mLanguage);
             }
         }
     }
     foreach ($mPath as $iKey => $sValue) {
         if ($sValue === null || $sValue === "") {
             unset($mPath[$iKey]);
         } else {
             $mPath[$iKey] = rawurlencode($sValue);
         }
     }
     if ($sPrefix !== null && $sPrefix !== "") {
         $sPrefix .= "/";
     } else {
         $sPrefix = '';
     }
     return MAIN_DIR_FE_PHP . $sPrefix . implode('/', $mPath) . self::prepareLinkParameters($aParameters);
 }
开发者ID:rapila,项目名称:cms-base,代码行数:48,代码来源:LinkUtil.php

示例4: textTagParseCallback

 public function textTagParseCallback($oHtmlTag, $sParsedChildren)
 {
     if ($oHtmlTag->getName() === 'text') {
         return $sParsedChildren;
     }
     if ($oHtmlTag->getName() === 'img') {
         if (preg_match("%display_document/(\\d+)%", $oHtmlTag->getParameter('src'), $aMatches)) {
             $aParameters = $oHtmlTag->getParameters();
             $this->addTrackReference($aMatches[1], "Document");
             return TemplateIdentifier::constructIdentifier('image', $aMatches[1], $aParameters);
         }
     }
     if ($oHtmlTag->getName() === 'a') {
         if ($sParsedChildren === '') {
             return '';
         }
         $bHasMatched = preg_match("%/" . preg_quote(Manager::getPrefixForManager('FileManager'), "%") . "/([^/]+)/(\\d+)((\\D.+)?)\$%", $oHtmlTag->getParameter('href'), $aMatches) === 1;
         if ($bHasMatched) {
             $sFileMethod = $aMatches[1];
             $iId = $aMatches[2];
             $sAdditional = $aMatches[3];
             $sIdentifier = 'file_link';
             $sModel = 'Document';
             if ($sFileMethod === 'external_link_proxy') {
                 $sIdentifier = 'external_link';
                 $sModel = 'Link';
             } else {
                 if ($sFileMethod === 'internal_link_proxy') {
                     $sIdentifier = 'internal_link';
                     $sModel = 'Page';
                 }
             }
             $this->addTrackReference($iId, $sModel);
             return TemplateIdentifier::constructIdentifier($sIdentifier, "{$iId}{$sAdditional}", array_merge($oHtmlTag->getParameters(), array('link_text' => $sParsedChildren)));
         } else {
             if (strpos($oHtmlTag->getParameter('href'), "mailto:") === 0) {
                 return TemplateIdentifier::constructIdentifier("mailto_link", substr($oHtmlTag->getParameter('href'), strlen("mailto:")), array("link_text" => $sParsedChildren));
             }
         }
     }
     $oTagWriter = new TagWriter($oHtmlTag->getName(), $oHtmlTag->getParameters(), $sParsedChildren);
     $oTagTemplate = $oTagWriter->parse(true);
     $oTagTemplate->bKillIdentifiersBeforeRender = false;
     return $oTagTemplate->render();
 }
开发者ID:rapila,项目名称:cms-base,代码行数:45,代码来源:RichtextUtil.php


注:本文中的Manager::getPrefixForManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。