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


PHP Backend::getTheme方法代码示例

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


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

示例1: run

 /**
  * Generate the module
  *
  * @return string
  */
 public function run()
 {
     /** @var \BackendTemplate|object $objTemplate */
     $objTemplate = new \BackendTemplate('be_live_update');
     $objTemplate->updateClass = 'tl_confirm';
     $objTemplate->updateHeadline = $GLOBALS['TL_LANG']['tl_maintenance']['liveUpdate'];
     $objTemplate->isActive = $this->isActive();
     $strMessage = ' <a href="contao/changelog.php" onclick="Backend.openModalIframe({\'width\':860,\'title\':\'CHANGELOG\',\'url\':this.href});return false" title="' . specialchars($GLOBALS['TL_LANG']['tl_maintenance']['changelog']) . '"><img src="' . TL_FILES_URL . 'system/themes/' . \Backend::getTheme() . '/images/changelog.gif" width="14" height="14" alt="" style="vertical-align:text-bottom;padding-left:3px"></a>';
     // Newer version available
     if (\Config::get('latestVersion') && version_compare(VERSION . '.' . BUILD, \Config::get('latestVersion'), '<')) {
         $objTemplate->updateClass = 'tl_info';
         $objTemplate->updateMessage = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['newVersion'], \Config::get('latestVersion')) . $strMessage;
     } else {
         $objTemplate->updateClass = 'tl_confirm';
         $objTemplate->updateMessage = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['upToDate'], VERSION . '.' . BUILD) . $strMessage;
     }
     // Automatically switch to SSL
     if (\Environment::get('ssl')) {
         \Config::set('liveUpdateBase', str_replace('http://', 'https://', \Config::get('liveUpdateBase')));
     }
     $objTemplate->uid = \Config::get('liveUpdateId');
     $objTemplate->updateServer = \Config::get('liveUpdateBase') . 'index.php';
     // Run the update
     if (\Input::get('token') != '') {
         $this->runLiveUpdate($objTemplate);
     }
     $objTemplate->version = VERSION . '.' . BUILD;
     $objTemplate->liveUpdateId = $GLOBALS['TL_LANG']['tl_maintenance']['liveUpdateId'];
     $objTemplate->runLiveUpdate = specialchars($GLOBALS['TL_LANG']['tl_maintenance']['runLiveUpdate']);
     $objTemplate->referer = base64_encode(\Environment::get('base') . \Environment::get('request') . '|' . \Environment::get('server'));
     $objTemplate->updateHelp = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['updateHelp'], '<a href="http://luid.inetrobots.com" target="_blank">Live Update ID</a>');
     $objTemplate->phar = file_exists(TL_ROOT . '/contao/update.phar.php');
     $objTemplate->toLiveUpdate = $GLOBALS['TL_LANG']['tl_maintenance']['toLiveUpdate'];
     return $objTemplate->parse();
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:40,代码来源:LiveUpdate.php

示例2: run

 /**
  * Run the controller and parse the login template
  */
 public function run()
 {
     $this->Template = new BackendTemplate('be_login');
     // Show a cookie warning
     if (Input::get('referer', true) != '' && empty($_COOKIE)) {
         $this->Template->noCookies = $GLOBALS['TL_LANG']['MSC']['noCookies'];
     }
     $strHeadline = sprintf($GLOBALS['TL_LANG']['MSC']['loginTo'], Config::get('websiteTitle'));
     $this->Template->theme = Backend::getTheme();
     $this->Template->messages = Message::generate();
     $this->Template->base = Environment::get('base');
     $this->Template->language = $GLOBALS['TL_LANGUAGE'];
     $this->Template->languages = System::getLanguages(true);
     $this->Template->title = specialchars($strHeadline);
     $this->Template->charset = Config::get('characterSet');
     $this->Template->action = ampersand(Environment::get('request'));
     $this->Template->userLanguage = $GLOBALS['TL_LANG']['tl_user']['language'][0];
     $this->Template->headline = $strHeadline;
     $this->Template->curLanguage = Input::post('language') ?: str_replace('-', '_', $GLOBALS['TL_LANGUAGE']);
     $this->Template->curUsername = Input::post('username') ?: '';
     $this->Template->uClass = $_POST && empty($_POST['username']) ? ' class="login_error"' : '';
     $this->Template->pClass = $_POST && empty($_POST['password']) ? ' class="login_error"' : '';
     $this->Template->loginButton = specialchars($GLOBALS['TL_LANG']['MSC']['loginBT']);
     $this->Template->username = $GLOBALS['TL_LANG']['tl_user']['username'][0];
     $this->Template->password = $GLOBALS['TL_LANG']['MSC']['password'][0];
     $this->Template->feLink = $GLOBALS['TL_LANG']['MSC']['feLink'];
     $this->Template->frontendFile = Environment::get('base');
     $this->Template->disableCron = Config::get('disableCron');
     $this->Template->ie6warning = sprintf($GLOBALS['TL_LANG']['ERR']['ie6warning'], '<a href="http://ie6countdown.com">', '</a>');
     $this->Template->default = $GLOBALS['TL_LANG']['MSC']['default'];
     $this->Template->output();
 }
开发者ID:iCodr8,项目名称:core,代码行数:35,代码来源:index.php

示例3: addIcon

 /**
  * Add an image to each record
  * @param array
  * @param string
  * @return string
  */
 public function addIcon($row, $label)
 {
     $image = 'published';
     if (!$row['published'] || strlen($row['start']) && $row['start'] > time() || strlen($row['stop']) && $row['stop'] < time()) {
         $image = 'un' . $image;
     }
     return sprintf('<div class="list_icon" style="background-image:url(\'system/themes/%s/images/%s.gif\');">%s</div>', \Backend::getTheme(), $image, $label);
 }
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:14,代码来源:Callback.php

示例4: addIcon

 /**
  * Add an image to each record
  *
  * @param array  $row
  * @param string $label
  *
  * @return string
  */
 public function addIcon($row, $label)
 {
     $image = 'mgroup';
     if ($row['disable'] || strlen($row['start']) && $row['start'] > time() || strlen($row['stop']) && $row['stop'] < time()) {
         $image .= '_';
     }
     return sprintf('<div class="list_icon" style="background-image:url(\'%ssystem/themes/%s/images/%s.gif\')" data-icon="%s.gif" data-icon-disabled="%s.gif">%s</div>', TL_ASSETS_URL, Backend::getTheme(), $image, rtrim($image, '_'), rtrim($image, '_') . '_', $label);
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:16,代码来源:tl_member_group.php

示例5: addIcon

 /**
  * Add an image to each record
  * @param array         $row
  * @param string        $label
  * @param DataContainer $dc
  * @param array         $args
  *
  * @return array
  */
 public function addIcon($row, $label, DataContainer $dc, $args)
 {
     $image = 'member';
     if ($row['disable'] || strlen($row['start']) && $row['start'] > time() || strlen($row['stop']) && $row['stop'] < time()) {
         $image .= '_';
     }
     $args[0] = sprintf('<div class="list_icon_new" style="background-image:url(\'%ssystem/themes/%s/images/%s.gif\')" data-icon="%s.gif" data-icon-disabled="%s.gif">&nbsp;</div>', TL_ASSETS_URL, Backend::getTheme(), $image, rtrim($image, '_'), rtrim($image, '_') . '_');
     return $args;
 }
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:18,代码来源:tl_member.php

示例6: addIcon

 /**
  * Add an image to each record
  *
  * @param array  $row
  * @param string $label
  *
  * @return string
  */
 public function addIcon($row, $label)
 {
     $image = 'mgroup';
     $time = \Date::floorToMinute();
     $disabled = $row['start'] !== '' && $row['start'] > $time || $row['stop'] !== '' && $row['stop'] < $time;
     if ($row['disable'] || $disabled) {
         $image .= '_';
     }
     return sprintf('<div class="list_icon" style="background-image:url(\'%ssystem/themes/%s/icons/%s.svg\')" data-icon="%s.svg" data-icon-disabled="%s.svg">%s</div>', TL_ASSETS_URL, Backend::getTheme(), $image, $disabled ? $image : rtrim($image, '_'), rtrim($image, '_') . '_', $label);
 }
开发者ID:contao,项目名称:core-bundle,代码行数:18,代码来源:tl_member_group.php

示例7: run

 /**
  * Run the controller and parse the password template
  */
 public function run()
 {
     /** @var \BackendTemplate|object $objTemplate */
     $objTemplate = new \BackendTemplate('be_password');
     if (\Input::post('FORM_SUBMIT') == 'tl_password') {
         $pw = \Input::postUnsafeRaw('password');
         $cnf = \Input::postUnsafeRaw('confirm');
         // The passwords do not match
         if ($pw != $cnf) {
             \Message::addError($GLOBALS['TL_LANG']['ERR']['passwordMatch']);
         } elseif (utf8_strlen($pw) < \Config::get('minPasswordLength')) {
             \Message::addError(sprintf($GLOBALS['TL_LANG']['ERR']['passwordLength'], \Config::get('minPasswordLength')));
         } elseif ($pw == $this->User->username) {
             \Message::addError($GLOBALS['TL_LANG']['ERR']['passwordName']);
         } else {
             // Make sure the password has been changed
             if (\Encryption::verify($pw, $this->User->password)) {
                 \Message::addError($GLOBALS['TL_LANG']['MSC']['pw_change']);
             } else {
                 $this->loadDataContainer('tl_user');
                 // Trigger the save_callback
                 if (is_array($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback'])) {
                     foreach ($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback'] as $callback) {
                         if (is_array($callback)) {
                             $this->import($callback[0]);
                             $pw = $this->{$callback[0]}->{$callback[1]}($pw);
                         } elseif (is_callable($callback)) {
                             $pw = $callback($pw);
                         }
                     }
                 }
                 $objUser = \UserModel::findByPk($this->User->id);
                 $objUser->pwChange = '';
                 $objUser->password = \Encryption::hash($pw);
                 $objUser->save();
                 \Message::addConfirmation($GLOBALS['TL_LANG']['MSC']['pw_changed']);
                 $this->redirect('' . $GLOBALS['TL_CONFIG']['backendPath'] . '/main.php');
             }
         }
         $this->reload();
     }
     $objTemplate->theme = \Backend::getTheme();
     $objTemplate->messages = \Message::generate();
     $objTemplate->base = \Environment::get('base');
     $objTemplate->language = $GLOBALS['TL_LANGUAGE'];
     $objTemplate->title = specialchars($GLOBALS['TL_LANG']['MSC']['pw_new']);
     $objTemplate->charset = \Config::get('characterSet');
     $objTemplate->action = ampersand(\Environment::get('request'));
     $objTemplate->headline = $GLOBALS['TL_LANG']['MSC']['pw_change'];
     $objTemplate->submitButton = specialchars($GLOBALS['TL_LANG']['MSC']['continue']);
     $objTemplate->password = $GLOBALS['TL_LANG']['MSC']['password'][0];
     $objTemplate->confirm = $GLOBALS['TL_LANG']['MSC']['confirm'][0];
     $objTemplate->output();
 }
开发者ID:rheintechnology,项目名称:core,代码行数:57,代码来源:BackendPassword.php

示例8: addIcon

 /**
  * Add an image to each record
  * @param array         $row
  * @param string        $label
  * @param DataContainer $dc
  * @param array         $args
  *
  * @return array
  */
 public function addIcon($row, $label, DataContainer $dc, $args)
 {
     $image = 'member';
     $time = \Date::floorToMinute();
     $disabled = $row['start'] !== '' && $row['start'] > $time || $row['stop'] !== '' && $row['stop'] < $time;
     if ($row['disable'] || $disabled) {
         $image .= '_';
     }
     $args[0] = sprintf('<div class="list_icon_new" style="background-image:url(\'%ssystem/themes/%s/icons/%s.svg\')" data-icon="%s.svg" data-icon-disabled="%s.svg">&nbsp;</div>', TL_ASSETS_URL, Backend::getTheme(), $image, $disabled ? $image : rtrim($image, '_'), rtrim($image, '_') . '_');
     return $args;
 }
开发者ID:qzminski,项目名称:contao-core-bundle,代码行数:20,代码来源:tl_member.php

示例9: initBackend

 protected function initBackend()
 {
     $backendThemePath = TL_ROOT . '/system/themes/' . \Backend::getTheme() . '/images/';
     $backendImagePath = TL_ROOT . '/system/modules/zdps_customize/assets/images/backend/';
     if (file_exists(TL_ROOT . '/system/modules/zdps_customize/assets/css/backend.css')) {
         $GLOBALS['TL_CSS'][] = 'system/modules/zdps_customize/assets/css/backend.css';
     }
     if (!file_exists($backendThemePath . 'header_center.gif')) {
         copy($backendImagePath . 'header_center.gif', $backendThemePath . 'header_center.gif');
         copy($backendImagePath . 'header_left.gif', $backendThemePath . 'header_left.gif');
         copy($backendImagePath . 'header_right.gif', $backendThemePath . 'header_right.gif');
     }
 }
开发者ID:pressi,项目名称:zdps_customize,代码行数:13,代码来源:System.php

示例10: run

 /**
  * Run the controller and parse the template
  */
 public function run()
 {
     $this->Template = new \BackendTemplate('be_picker');
     $this->Template->main = '';
     // Ajax request
     if ($_POST && \Environment::get('isAjaxRequest')) {
         $this->objAjax = new \Ajax(\Input::post('action'));
         $this->objAjax->executePreActions();
     }
     $strTable = \Input::get('table');
     $strField = \Input::get('field');
     // Define the current ID
     define('CURRENT_ID', \Input::get('id'));
     $this->loadDataContainer($strTable);
     \System::loadLanguageFile($strTable);
     $objDca = new \DC_Table($strTable);
     // AJAX request
     if ($_POST && \Environment::get('isAjaxRequest')) {
         $this->objAjax->executePostActions($objDca);
     }
     $this->Session->set('groupPickerRef', \Environment::get('request'));
     // Prepare the widget
     $objProductGroupTree = new $GLOBALS['BE_FFL']['productGroupSelector'](array('strId' => $strField, 'strTable' => $strTable, 'strField' => $strField, 'strName' => $strField, 'varValue' => explode(',', \Input::get('value'))), $objDca);
     $this->Template->main = $objProductGroupTree->generate();
     $this->Template->theme = \Backend::getTheme();
     $this->Template->base = \Environment::get('base');
     $this->Template->language = $GLOBALS['TL_LANGUAGE'];
     $this->Template->title = specialchars($GLOBALS['TL_LANG']['MSC']['filepicker']);
     $this->Template->headline = $GLOBALS['TL_LANG']['MSC']['ppHeadline'];
     $this->Template->charset = $GLOBALS['TL_CONFIG']['characterSet'];
     $this->Template->options = $this->createPageList();
     $this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode'];
     $this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode'];
     $this->Template->loadingData = $GLOBALS['TL_LANG']['MSC']['loadingData'];
     $this->Template->search = $GLOBALS['TL_LANG']['MSC']['search'];
     $this->Template->action = ampersand(\Environment::get('request'));
     $this->Template->value = $this->Session->get('product_group_selector_search');
     $this->Template->addSearch = true;
     if ($this->User->isAdmin || is_array($this->User->iso_groupp) && !empty($this->User->iso_groupp)) {
         $this->Template->manager = $GLOBALS['TL_LANG']['tl_iso_group']['manager'];
         $this->Template->managerHref = 'contao/main.php?do=iso_products&amp;table=tl_iso_group&amp;popup=1';
     }
     $GLOBALS['TL_CONFIG']['debugMode'] = false;
     $this->Template->output();
 }
开发者ID:Aziz-JH,项目名称:core,代码行数:48,代码来源:group.php

示例11: getHtml

 /**
  * return a icon tag instead of an Image
  *
  * @param string $src
  * @param string $alt
  * @param string $attributes
  *
  * @return string
  */
 public static function getHtml($src, $alt = '', $attributes = '')
 {
     // Only do this in the Backend
     if (TL_MODE == "FE" || \Backend::getTheme() != "sb-admin") {
         return parent::getHtml($src, $alt, $attributes);
     }
     $arrImage = array('article.gif' => 'share', 'article_.gif' => 'share icon-disabled', 'copychilds.gif' => 'files-o', 'copychilds_.gif' => 'files-o icon-disabled', 'apply.gif' => 'check-circle', 'copy.gif' => 'plus', 'cut.gif' => 'sort', 'delete.gif' => 'trash-o', 'edit.gif' => 'pencil', 'edit_.gif' => 'pencil icon-disabled', 'editor.gif' => 'file-code-o', 'editor_.gif' => 'file-code-o icon-disabled', 'featured_.gif' => 'star-o', 'featured.gif' => 'star', 'header.gif' => 'cogs', 'invisible.gif' => 'eye-slash', 'new.gif' => 'plus-circle', 'pasteafter.gif' => 'caret-down', 'pasteafter_.gif' => 'caret-down icon-disabled', 'pasteinto.gif' => 'caret-right', 'pasteinto_.gif' => 'caret-right icon-disabled', 'protect.gif' => 'unlock', 'protect_.gif' => 'lock', 'show.gif' => 'info', 'undo.gif' => 'undo', 'visible.gif' => 'eye', 'modules.gif' => 'cogs', 'pagemounts.gif' => 'globe', 'root.gif' => 'globe', 'root_1.gif' => 'globe icon-disabled', 'diff.gif' => 'tasks', 'diffTemplate.gif' => 'tasks', 'diff_.gif' => 'tasks icon-disabled', 'diffTemplate_.gif' => 'tasks icon-disabled', 'drag.gif' => 'sort', 'up.gif' => 'arrow-up', 'down.gif' => 'arrow-down', 'folMinus.gif' => 'minus-square-o', 'folPlus.gif' => 'plus-square-o', 'mgroup.gif' => 'users', 'member.gif' => 'user', 'member_.gif' => 'user icon-disabled', 'su.gif' => 'qq');
     if (array_key_exists($src, $arrImage)) {
         preg_match('/class=\\"([^\\"]*)\\"/', $attributes, $matches);
         $cssClass = isset($matches[1]) ? " " . $matches[1] : "";
         preg_match('/style=\\"([^\\"]*)\\"/', $attributes, $matches);
         $style = isset($matches[1]) ? ' style="' . $matches[1] . '"' : "";
         preg_match('/title=\\"([^\\"]*)\\"/', $attributes, $matches);
         $title = isset($matches[1]) ? ' title="' . $matches[1] . '"' : "";
         return sprintf('<i class="fa fa-%s%s action-icon"%s%s></i>', $arrImage[$src], $cssClass, $style, $title);
     }
     return parent::getHtml($src, $alt, $attributes);
 }
开发者ID:zeromax,项目名称:contao-sb-admin,代码行数:27,代码来源:Image.php

示例12: parseTemplate

 /**
  * switch the back end templates and extend them
  *
  * @param \BackendTemplate $objTemplate
  */
 public function parseTemplate($objTemplate)
 {
     $strTemplate = $objTemplate->getName();
     if (\Backend::getTheme() != "sb-admin" || strpos($strTemplate, 'be_') === false) {
         return;
     }
     switch ($strTemplate) {
         case "be_main":
             $this->parseMainTemplate($objTemplate);
             break;
         case "be_welcome":
             $this->parseWelcomeTemplate($objTemplate);
             break;
         case "be_switch":
             \TemplateLoader::addFile('be_switch', 'system/modules/sb-admin/templates/backend');
             break;
     }
 }
开发者ID:zeromax,项目名称:contao-sb-admin,代码行数:23,代码来源:SbTemplate.php

示例13: run

 /**
  * Run the controller
  */
 public function run()
 {
     // Parse the changelog file
     $strBuffer = file_get_contents(TL_ROOT . '/system/docs/CHANGELOG.md');
     // Remove carriage returns (see #4190)
     $strBuffer = str_replace("\r", '', $strBuffer);
     // Convert to HTML
     $strBuffer = \Michelf\MarkdownExtra::defaultTransform($strBuffer);
     // Add the template
     $this->Template = new BackendTemplate('be_changelog');
     // Assign the template variables
     $this->Template->content = $strBuffer;
     $this->Template->theme = Backend::getTheme();
     $this->Template->base = Environment::get('base');
     $this->Template->language = $GLOBALS['TL_LANGUAGE'];
     $this->Template->title = specialchars($GLOBALS['TL_LANG']['MSC']['changelog']);
     $this->Template->charset = Config::get('characterSet');
     Config::set('debugMode', false);
     $this->Template->output();
 }
开发者ID:iCodr8,项目名称:core,代码行数:23,代码来源:changelog.php

示例14: run

 /**
  * Run the controller and parse the template
  */
 public function run()
 {
     $this->Template = new BackendTemplate('be_picker');
     $this->Template->main = '';
     // Ajax request
     if ($_POST && Environment::get('isAjaxRequest')) {
         $this->objAjax = new Ajax(Input::post('action'));
         $this->objAjax->executePreActions();
     }
     $strTable = Input::get('table');
     $strField = Input::get('field');
     // Define the current ID
     define('CURRENT_ID', Input::get('table') ? $this->Session->get('CURRENT_ID') : Input::get('id'));
     $this->loadDataContainer($strTable);
     $strDriver = 'DC_' . $GLOBALS['TL_DCA'][$strTable]['config']['dataContainer'];
     $objDca = new $strDriver($strTable);
     // AJAX request
     if ($_POST && Environment::get('isAjaxRequest')) {
         $this->objAjax->executePostActions($objDca);
     }
     $this->Session->set('filePickerRef', \Environment::get('request'));
     // Prepare the widget
     $class = $GLOBALS['BE_FFL']['pageSelector'];
     $objPageTree = new $class($class::getAttributesFromDca($GLOBALS['TL_DCA'][$strTable]['fields'][$strField], $strField, array_filter(explode(',', Input::get('value'))), $strField, $strTable, $objDca));
     $this->Template->main = $objPageTree->generate();
     $this->Template->theme = Backend::getTheme();
     $this->Template->base = Environment::get('base');
     $this->Template->language = $GLOBALS['TL_LANGUAGE'];
     $this->Template->title = specialchars($GLOBALS['TL_LANG']['MSC']['pagepicker']);
     $this->Template->charset = Config::get('characterSet');
     $this->Template->addSearch = true;
     $this->Template->search = $GLOBALS['TL_LANG']['MSC']['search'];
     $this->Template->action = ampersand(Environment::get('request'));
     $this->Template->value = $this->Session->get('page_selector_search');
     $this->Template->manager = $GLOBALS['TL_LANG']['MSC']['pageManager'];
     $this->Template->managerHref = 'contao/main.php?do=page&amp;popup=1';
     $this->Template->breadcrumb = $GLOBALS['TL_DCA']['tl_page']['list']['sorting']['breadcrumb'];
     Config::set('debugMode', false);
     $this->Template->output();
 }
开发者ID:iCodr8,项目名称:core,代码行数:43,代码来源:page.php

示例15: addBreadcrumb

    /**
     * Add the breadcrumb menu
     */
    public function addBreadcrumb()
    {
        // Set a new node
        if (isset($_GET['node'])) {
            $this->Session->set('tl_templates_node', Input::get('node', true));
            $this->redirect(preg_replace('/(&|\\?)node=[^&]*/', '', Environment::get('request')));
        }
        $strNode = $this->Session->get('tl_templates_node');
        if ($strNode == '') {
            return;
        }
        // Currently selected folder does not exist
        if (!is_dir(TL_ROOT . '/' . $strNode)) {
            $this->Session->set('tl_templates_node', '');
            return;
        }
        $strPath = 'templates';
        $arrNodes = explode('/', preg_replace('/^templates\\//', '', $strNode));
        $arrLinks = array();
        // Add root link
        $arrLinks[] = '<img src="' . TL_FILES_URL . 'system/themes/' . Backend::getTheme() . '/images/filemounts.gif" width="18" height="18" alt=""> <a href="' . $this->addToUrl('node=') . '" title="' . specialchars($GLOBALS['TL_LANG']['MSC']['selectAllNodes']) . '">' . $GLOBALS['TL_LANG']['MSC']['filterAll'] . '</a>';
        // Generate breadcrumb trail
        foreach ($arrNodes as $strFolder) {
            $strPath .= '/' . $strFolder;
            // No link for the active folder
            if ($strFolder == basename($strNode)) {
                $arrLinks[] = '<img src="' . TL_FILES_URL . 'system/themes/' . Backend::getTheme() . '/images/folderC.gif" width="18" height="18" alt=""> ' . $strFolder;
            } else {
                $arrLinks[] = '<img src="' . TL_FILES_URL . 'system/themes/' . Backend::getTheme() . '/images/folderC.gif" width="18" height="18" alt=""> <a href="' . $this->addToUrl('node=' . $strPath) . '" title="' . specialchars($GLOBALS['TL_LANG']['MSC']['selectNode']) . '">' . $strFolder . '</a>';
            }
        }
        // Limit tree
        $GLOBALS['TL_DCA']['tl_templates']['list']['sorting']['root'] = array($strNode);
        // Insert breadcrumb menu
        $GLOBALS['TL_DCA']['tl_templates']['list']['sorting']['breadcrumb'] .= '

<ul id="tl_breadcrumb">
  <li>' . implode(' &gt; </li><li>', $arrLinks) . '</li>
</ul>';
    }
开发者ID:iCodr8,项目名称:core,代码行数:43,代码来源:tl_templates.php


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