當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。