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


PHP Sigma::addBlock方法代码示例

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


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

示例1: empty

 /**
  * The mailtemplate settings view
  *
  * Stores MailTemplates posted from the {@see MailTemplate::edit()} view.
  * Deletes a MailTemplate on request from the
  * {@see MailTemplate::overview()} view.
  * Includes both the overview and the edit view, activates one depending
  * on the outcome of the call to {@see MailTemplate::storeFromPost()}
  * or the current active_tab.
  * @return  boolean               True on success, false otherwise
  */
 static function view_settings_mail()
 {
     global $_CORELANG;
     // TODO: TEMPORARY.  Remove when a proper update is available.
     $template = \Cx\Core\MailTemplate\Controller\MailTemplate::get('Shop', 'order_confirmation');
     //die(var_export($template, true));
     if (!$template) {
         ShopMail::errorHandler();
     }
     $result = true;
     $_REQUEST['active_tab'] = 1;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'mailtemplate_edit') {
         $_REQUEST['active_tab'] = 2;
     }
     \Cx\Core\MailTemplate\Controller\MailTemplate::deleteTemplate('Shop');
     // If there is anything to be stored, and if that fails, return to
     // the edit view in order to save the posted form content
     $result_store = \Cx\Core\MailTemplate\Controller\MailTemplate::storeFromPost('Shop');
     if ($result_store === false) {
         $_REQUEST['active_tab'] = 2;
     }
     $objTemplate = null;
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_CORELANG['TXT_CORE_MAILTEMPLATES'], \Cx\Core\MailTemplate\Controller\MailTemplate::overview('Shop', 'config', \Cx\Core\Setting\Controller\Setting::getValue('numof_mailtemplate_per_page_backend', 'Shop'))->get());
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, empty($_REQUEST['key']) ? $_CORELANG['TXT_CORE_MAILTEMPLATE_ADD'] : $_CORELANG['TXT_CORE_MAILTEMPLATE_EDIT'], \Cx\Core\MailTemplate\Controller\MailTemplate::edit('Shop')->get());
     self::$objTemplate->addBlock('SHOP_SETTINGS_FILE', 'settings_block', $objTemplate->get());
     self::$objTemplate->touchBlock('settings_block');
     return $result;
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:39,代码来源:ShopManager.class.php

示例2: overview

 private function overview()
 {
     global $_LANGID;
     // load source code if cmd value is integer
     if ($this->objTemplate->placeholderExists('APPLICATION_DATA')) {
         $page = new \Cx\Core\ContentManager\Model\Entity\Page();
         $page->setVirtual(true);
         $page->setType(\Cx\Core\ContentManager\Model\Entity\Page::TYPE_APPLICATION);
         $page->setModule('Downloads');
         // load source code
         $applicationTemplate = \Cx\Core\Core\Controller\Cx::getContentTemplateOfPage($page);
         \LinkGenerator::parseTemplate($applicationTemplate);
         $this->objTemplate->addBlock('APPLICATION_DATA', 'application_data', $applicationTemplate);
     }
     $objDownload = new Download();
     $objCategory = Category::getCategory($this->categoryId);
     if ($objCategory->getId()) {
         // check access permissions to selected category
         if (!\Permission::checkAccess(143, 'static', true) && $objCategory->getReadAccessId() && !\Permission::checkAccess($objCategory->getReadAccessId(), 'dynamic', true) && $objCategory->getOwnerId() != $this->userId) {
             // TODO: might we have to add a soft noAccess handler in case the output is meant for a regular page (not section=Downloads)
             \Permission::noAccess(base64_encode(CONTREXX_SCRIPT_PATH . $this->moduleParamsJs . '&category=' . $objCategory->getId()));
         }
         // parse crumbtrail
         $this->parseCrumbtrail($objCategory);
         if ($objDownload->load(!empty($_REQUEST['id']) ? intval($_REQUEST['id']) : 0) && (!$objDownload->getExpirationDate() || $objDownload->getExpirationDate() > time()) && $objDownload->getActiveStatus()) {
             /* DOWNLOAD DETAIL PAGE */
             $this->pageTitle = contrexx_raw2xhtml($objDownload->getName(FRONTEND_LANG_ID));
             $metakeys = $objDownload->getMetakeys(FRONTEND_LANG_ID);
             if ($this->arrConfig['use_attr_metakeys'] && !empty($metakeys)) {
                 \Env::get('cx')->getPage()->setMetakeys($metakeys);
             }
             $this->parseRelatedCategories($objDownload);
             $this->parseRelatedDownloads($objDownload, $objCategory->getId());
             $this->parseDownload($objDownload, $objCategory->getId());
             // hide unwanted blocks on the detail page
             if ($this->objTemplate->blockExists('downloads_category')) {
                 $this->objTemplate->hideBlock('downloads_category');
             }
             if ($this->objTemplate->blockExists('downloads_subcategory_list')) {
                 $this->objTemplate->hideBlock('downloads_subcategory_list');
             }
             if ($this->objTemplate->blockExists('downloads_file_list')) {
                 $this->objTemplate->hideBlock('downloads_file_list');
             }
             if ($this->objTemplate->blockExists('downloads_simple_file_upload')) {
                 $this->objTemplate->hideBlock('downloads_simple_file_upload');
             }
             if ($this->objTemplate->blockExists('downloads_advanced_file_upload')) {
                 $this->objTemplate->hideBlock('downloads_advanced_file_upload');
             }
         } else {
             /* CATEGORY DETAIL PAGE */
             $this->pageTitle = htmlentities($objCategory->getName($_LANGID), ENT_QUOTES, CONTREXX_CHARSET);
             // process create directory
             $this->processCreateDirectory($objCategory);
             // parse selected category
             $this->parseCategory($objCategory);
             // parse subcategories
             $this->parseCategories($objCategory, array('downloads_subcategory_list', 'downloads_subcategory'), null, 'SUB');
             // parse downloads of selected category
             $this->parseDownloads($objCategory);
             // parse upload form
             $this->parseUploadForm($objCategory);
             // parse create directory form
             $this->parseCreateCategoryForm($objCategory);
             // hide unwanted blocks on the category page
             if ($this->objTemplate->blockExists('downloads_download')) {
                 $this->objTemplate->hideBlock('downloads_download');
             }
             if ($this->objTemplate->blockExists('downloads_file_detail')) {
                 $this->objTemplate->hideBlock('downloads_file_detail');
             }
         }
         // hide unwanted blocks on the category/detail page
         if ($this->objTemplate->blockExists('downloads_overview')) {
             $this->objTemplate->hideBlock('downloads_overview');
         }
         if ($this->objTemplate->blockExists('downloads_most_viewed_file_list')) {
             $this->objTemplate->hideBlock('downloads_most_viewed_file_list');
         }
         if ($this->objTemplate->blockExists('downloads_most_downloaded_file_list')) {
             $this->objTemplate->hideBlock('downloads_most_downloaded_file_list');
         }
         if ($this->objTemplate->blockExists('downloads_most_popular_file_list')) {
             $this->objTemplate->hideBlock('downloads_most_popular_file_list');
         }
         if ($this->objTemplate->blockExists('downloads_newest_file_list')) {
             $this->objTemplate->hideBlock('downloads_newest_file_list');
         }
         if ($this->objTemplate->blockExists('downloads_updated_file_list')) {
             $this->objTemplate->hideBlock('downloads_updated_file_list');
         }
     } else {
         /* CATEGORY OVERVIEW PAGE */
         $this->parseCategories($objCategory, array('downloads_overview', 'downloads_overview_category'), null, null, 'downloads_overview_row', array('downloads_overview_subcategory_list', 'downloads_overview_subcategory'), $this->arrConfig['overview_max_subcats']);
         if (!empty($this->searchKeyword)) {
             $this->parseDownloads($objCategory);
         } else {
             if ($this->objTemplate->blockExists('downloads_file_list')) {
                 $this->objTemplate->hideBlock('downloads_file_list');
//.........这里部分代码省略.........
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:101,代码来源:Downloads.class.php

示例3: preContentLoad

 /**
  * Calls hooks before content is processed
  * @todo Remove usage of globals
  * @global null $moduleStyleFile
  * @global type $plainCmd
  * @global type $plainSection
  * @global type $themesPages
  * @global type $page_template
  */
 protected function preContentLoad()
 {
     global $moduleStyleFile, $plainCmd, $plainSection, $themesPages, $page_template;
     $this->ch->callPreContentLoadHooks();
     if ($this->mode == self::MODE_FRONTEND) {
         // load content.html template (or customized version)
         $this->template->setTemplate($themesPages['index']);
         $this->template->addBlock('CONTENT_FILE', 'page_template', $page_template);
         // load application content template
         $this->loadContentTemplateOfPage();
         // Set global content variables.
         $pageContent = $this->resolvedPage->getContent();
         $this->parseGlobalPlaceholders($pageContent);
         $pageContent = str_replace('{TITLE}', $this->resolvedPage->getTitle(), $pageContent);
         //replace the {NODE_<ID>_<LANG>}- placeholders
         \LinkGenerator::parseTemplate($pageContent);
         $this->resolvedPage->setContent($pageContent);
         $moduleStyleFile = null;
     } else {
         if ($this->mode == self::MODE_BACKEND) {
             // Skip the nav/language bar for modules which don't make use of either.
             // TODO: Remove language selector for modules which require navigation but bring their own language management.
             if ($this->ch->isLegacyComponent($plainCmd)) {
                 $this->template->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             }
             $plainSection = $plainCmd;
         }
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:38,代码来源:Cx.class.php


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