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


PHP Sigma::placeholderExists方法代码示例

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


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

示例1: preRender

 protected function preRender($lang)
 {
     if ($this->template->placeholderExists('LEVELS_FULL') || $this->template->placeholderExists('levels_full')) {
         $this->rootNode = \Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\Node')->getRoot();
     }
     $this->realPreRender($lang);
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:7,代码来源:SigmaPageTree.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:

 static function verify_payment_details()
 {
     global $_ARRAYLANG;
     if (empty($_POST['check'])) {
         return true;
     }
     // if it is the internal_lsv payment processor, store the sent data into
     // session
     if (self::processor_name() == 'internal_lsv') {
         if (!empty($_POST['account_holder'])) {
             $_SESSION['shop']['account_holder'] = contrexx_input2raw($_POST['account_holder']);
         }
         if (!empty($_POST['account_bank'])) {
             $_SESSION['shop']['account_bank'] = contrexx_input2raw($_POST['account_bank']);
         }
         if (!empty($_POST['account_blz'])) {
             $_SESSION['shop']['account_blz'] = contrexx_input2raw($_POST['account_blz']);
         }
     }
     $status = true;
     // Payment status is true, if either
     // - the total price (including VAT and shipment) is zero (or less!?), or
     // - the paymentId is set and valid, and the LSV status evaluates to true.
     // luckily, shipping, VAT, and price have been handled in update_session()
     // above already, so we'll only have to check grand_total_price
     if ($_SESSION['shop']['grand_total_price'] > 0 && (empty($_SESSION['shop']['paymentId']) || self::processor_name() == 'Internal_LSV' && !self::lsv_complete())) {
         //\DBG::log("Shop::verify_payment_details(): Payment missing!");
         $status = false;
         \Message::error($_ARRAYLANG['TXT_FILL_OUT_ALL_REQUIRED_FIELDS']);
     }
     // Shipment status is true, if either
     // - no shipment is desired, or
     // - the shipperId is set already (and the shipment conditions were validated)
     if (Cart::needs_shipment()) {
         //\DBG::log("Shop::verify_payment_details(): Shipment necessary");
         if (empty($_SESSION['shop']['shipperId'])) {
             //\DBG::log("Shop::verify_payment_details(): Shipment missing!");
             // Ask the Customer to pick a different Shipper if none is
             // selected or it did not work
             $status = false;
             \Message::error($_ARRAYLANG['TXT_SHIPPER_NO_GOOD']);
         }
     }
     // AGB status is true, if either
     // - the agb placeholder does not exist
     // - the agb checkbox has been checked
     if (!(self::$objTemplate->placeholderExists('SHOP_AGB') ? !empty($_POST['agb']) ? true : false : true)) {
         //\DBG::log("Shop::verify_payment_details(): AGB missing!");
         $status = false;
         \Message::error($_ARRAYLANG['TXT_ACCEPT_AGB']);
     }
     // Ditto for cancellation terms
     if (!(self::$objTemplate->placeholderExists('SHOP_CANCELLATION_TERMS_CHECKED') ? !empty($_POST['cancellation_terms']) ? true : false : true)) {
         //\DBG::log("Shop::verify_payment_details(): cancellation terms missing!");
         $status = false;
         \Message::error($_ARRAYLANG['TXT_SHOP_CANCELLATION_TERMS_PLEASE_ACCEPT']);
     }
     if ($status) {
         // Everything is set and valid
         \Cx\Core\Csrf\Controller\Csrf::redirect(\Cx\Core\Routing\Url::fromModuleAndCmd('Shop', 'confirm'));
     }
     // Something is missing od invalid
     return false;
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:64,代码来源:Shop.class.php


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