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


PHP Widget::parse方法代码示例

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


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

示例1: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     if (TL_MODE == 'BE') {
         $this->html = htmlspecialchars($this->html);
     }
     return parent::parse($arrAttributes);
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:14,代码来源:FormHtml.php

示例2: parse

 /**
  * Add the labels and messages.
  *
  * @param null $arrAttributes
  */
 public function parse($arrAttributes = null)
 {
     // Messages (passed on to fineuploader JS)
     $basicTextOptions = array('text' => array('formatProgress', 'failUpload', 'waitingForResponse', 'paused'), 'messages' => array('typeError', 'sizeError', 'minSizeError', 'emptyError', 'noFilesError', 'tooManyItemsError', 'maxHeightImageError', 'maxWidthImageError', 'minHeightImageError', 'minWidthImageError', 'retryFailTooManyItems', 'onLeave', 'unsupportedBrowserIos8Safari'), 'retry' => array('autoRetryNote'), 'deleteFile' => array('confirmMessage', 'deletingStatusText', 'deletingFailedText'), 'paste' => array('namePromptMessage'));
     $config = array();
     foreach ($basicTextOptions as $category => $messages) {
         foreach ($messages as $message) {
             // Only translate if available, otherwise fall back to default (EN)
             if (isset($GLOBALS['TL_LANG']['MSC']['fineuploader_trans'][$category][$message])) {
                 $config[$category][$message] = $GLOBALS['TL_LANG']['MSC']['fineuploader_trans'][$category][$message];
             }
         }
     }
     // BC (used to be a JSON string)
     if (isset($this->arrConfiguration['uploaderConfig']) && $this->arrConfiguration['uploaderConfig'] !== '') {
         $this->arrConfiguration['uploaderConfig'] = json_decode('{' . $this->arrConfiguration['uploaderConfig'] . '}', true);
     }
     // Merge with custom options
     $this->config = json_encode(array_merge($config, (array) $this->arrConfiguration['uploaderConfig']));
     // Labels (in HTML)
     $labels = array('drop', 'upload', 'processing', 'cancel', 'retry', 'delete', 'close', 'yes', 'no');
     $preparedLabels = array();
     foreach ($labels as $label) {
         $preparedLabels[$label] = $GLOBALS['TL_LANG']['MSC']['fineuploader_' . $label];
     }
     $this->labels = $preparedLabels;
     return parent::parse($arrAttributes);
 }
开发者ID:terminal42,项目名称:contao-fineuploader,代码行数:33,代码来源:FineUploaderBase.php

示例3: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     // Return a wildcard in the back end
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . $GLOBALS['TL_LANG']['FFL']['colStart'][0] . ' ###';
         return $objTemplate->parse();
     }
     return parent::parse($arrAttributes);
 }
开发者ID:erdmannfreunde,项目名称:euf_grid,代码行数:18,代码来源:FormColStart.php

示例4: parse

 /**
  * Add custom HTML after the widget
  *
  * @param array $attributes
  *
  * @return string
  */
 public function parse($attributes = null)
 {
     if (TL_MODE == 'BE') {
         $template = new BackendTemplate('be_wildcard');
         $template->wildcard = '### PAGE BREAK ###';
         return $template->parse();
     }
     $manager = new MPFormsFormManager($this->pid);
     $this->canGoBack = !$manager->isFirstStep();
     return parent::parse($attributes);
 }
开发者ID:terminal42,项目名称:contao-mp_forms,代码行数:18,代码来源:FormMPFormPageSwitch.php

示例5: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     // Return a wildcard in the back end
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### E&F GRID: ' . $GLOBALS['TL_LANG']['FFL']['rowStart'][0] . '  ###';
         $objTemplate->wildcard .= '<div class="tl_content_right tl_gray m12">(' . $GLOBALS['EUF_GRID_SETTING']['row'] . ')</div>';
         return $objTemplate->parse();
     }
     return parent::parse($arrAttributes);
 }
开发者ID:erdmannfreunde,项目名称:euf_grid,代码行数:19,代码来源:FormRowStart.php

示例6: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     // Return a wildcard in the back end
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         if ($this->fsType == 'fsStart') {
             $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['fsStart'][0]) . ' ###' . ($this->label ? '<br>' . $this->label : '');
         } else {
             $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['fsStop'][0]) . ' ###';
         }
         return $objTemplate->parse();
     }
     return parent::parse($arrAttributes);
 }
开发者ID:jamesdevine,项目名称:core-bundle,代码行数:22,代码来源:FormFieldset.php

示例7: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     // Return a wildcard in the back end
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         if ($this->successType == 'successStart') {
             $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['successStart'][0]) . ' ###' . ($this->label ? '<br>' . $this->label : '');
         } else {
             $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['successStop'][0]) . ' ###';
         }
         return $objTemplate->parse();
     }
     // Only tableless forms are supported
     if (!$this->tableless) {
         return '';
     }
     return parent::parse($arrAttributes);
 }
开发者ID:heimrichhannot,项目名称:contao-bootstrapper,代码行数:25,代码来源:FormSuccessGroup.php

示例8: parse

 public function parse($arrAttributes = null)
 {
     $this->text = \String::toHtml5($this->text);
     return parent::parse($arrAttributes);
 }
开发者ID:designs2,项目名称:codeowl_grid_control,代码行数:5,代码来源:FormRowStart.php

示例9: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     $strClass = 'select';
     if ($this->multiple) {
         $this->strName .= '[]';
         $strClass = 'multiselect';
     } elseif (is_array($this->varValue)) {
         $this->varValue = $this->varValue[0];
     }
     // Chosen
     if ($this->chosen) {
         $strClass .= ' tl_chosen';
     }
     // Custom class
     if ($this->strClass != '') {
         $strClass .= ' ' . $this->strClass;
     }
     $this->strClass = $strClass;
     return parent::parse($arrAttributes);
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:27,代码来源:FormSelectMenu.php

示例10: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     if ($this->imageSubmit && $this->singleSRC != '') {
         $objModel = \FilesModel::findByUuid($this->singleSRC);
         if ($objModel === null) {
             if (!\Validator::isUuid($this->singleSRC)) {
                 return '<p class="error">' . $GLOBALS['TL_LANG']['ERR']['version2format'] . '</p>';
             }
         } elseif (is_file(TL_ROOT . '/' . $objModel->path)) {
             $this->src = $objModel->path;
         }
     }
     return parent::parse($arrAttributes);
 }
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:21,代码来源:FormSubmit.php

示例11: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     $this->confirmLabel = sprintf($GLOBALS['TL_LANG']['MSC']['confirmation'], $this->strLabel);
     return parent::parse($arrAttributes);
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:12,代码来源:FormPassword.php

示例12: parse

 /**
  * Parse the template file and return it as string
  *
  * @param array $arrAttributes An optional attributes array
  *
  * @return string The template markup
  */
 public function parse($arrAttributes = null)
 {
     if ($this->imageSubmit && $this->singleSRC != '') {
         $objModel = \FilesModel::findByUuid($this->singleSRC);
         if ($objModel !== null && is_file(TL_ROOT . '/' . $objModel->path)) {
             $this->src = $objModel->path;
         }
     }
     return parent::parse($arrAttributes);
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:17,代码来源:FormSubmit.php


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