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


PHP HtmlHelper::escape方法代码示例

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


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

示例1: __toString

 function __toString()
 {
     $this->setAttribute('class', 'tinymce_textarea');
     $this->innerHTML = HtmlHelper::escape($this->_value);
     $config = JsonHelper::encode($this->config);
     $script = HtmlHelper::inlineJavascript('tinyMCE.init(' . $config . ');');
     $this->afterHTML = $script;
     self::$instances_included++;
     return parent::__toString();
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:10,代码来源:tinymceeditor.input.php

示例2: __toString

 function __toString()
 {
     if (!$this->getAttribute('cols')) {
         $this->setAttribute('cols', 30);
     }
     if (!$this->getAttribute('rows')) {
         $this->setAttribute('rows', 5);
     }
     $this->innerHTML = HtmlHelper::escape($this->_value);
     return parent::__toString();
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:11,代码来源:inputtextarea.class.php

示例3: createHtmlOptions

 protected function createHtmlOptions($items)
 {
     $options = array();
     foreach ($items as $value => $text) {
         if ($value != $this->_value) {
             $options[] = "<option value=\"" . HtmlHelper::escape($value) . "\">" . HtmlHelper::escape($text) . "</option>";
         } else {
             $options[] = "<option value=\"" . HtmlHelper::escape($value) . "\" selected='selected'>" . HtmlHelper::escape($text) . "</option>";
         }
     }
     return $options;
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:12,代码来源:inputdropdown.class.php

示例4: __toString

 function __toString()
 {
     $html = $this->beforeHTML;
     $html .= "<{$this->_tag_name} {$this->_inner_string} ";
     foreach ($this->_attributes as $name => $value) {
         $html .= $name . '="' . HtmlHelper::escape($value) . '" ';
     }
     if ($this->_can_have_children) {
         $html .= ">{$this->innerHTML}</{$this->_tag_name}>\r\n";
     } else {
         $html .= "/>\r\n";
     }
     $html .= $this->afterHTML;
     return $html;
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:15,代码来源:htmlelement.class.php

示例5: errorMessage

 static function errorMessage($message, $name = '', $attributes = array())
 {
     if (!isset($attributes['class'])) {
         $attributes['class'] = 'error-message';
     }
     if (!$message) {
         if (!isset($attributes['style'])) {
             $attributes['style'] = '';
         }
         $attributes['style'] .= ';display:none;';
     }
     if ($name != '' && !isset($attributes['id'])) {
         //Warning: This doesn't work with page with multiple forms
         $attributes['id'] = 'error-message-' . $name;
     }
     $message = HtmlHelper::escape($message);
     $attributes = HtmlHelper::formatAttributes($attributes);
     return "<div {$attributes}>{$message}</div>";
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:19,代码来源:form.helper.php

示例6: getErrorSummary

 function getErrorSummary()
 {
     //The existence of sent values assumes that errors exist
     if ($this->_raw_value) {
         if ($this->_error_summary) {
             return HtmlHelper::escape($this->_error_summary);
             //Be aware of this
         } else {
             return AppConfig::$default_errors['summary'];
         }
     }
     return '';
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:13,代码来源:formelementlist.base.php

示例7: getHeadHtml

 protected function getHeadHtml()
 {
     $html = new HtmlHelper($this->context);
     $output = '';
     foreach ($this->metas as $meta) {
         if ($meta['name']) {
             $output .= "<meta name=\"{$meta['name']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
         } elseif ($meta['http-equiv']) {
             $output .= "<meta http-equiv=\"{$meta['http-equiv']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
         }
     }
     $output .= "<title>" . HtmlHelper::escape($this->title) . "</title>\r\n";
     $output .= '<base href="' . UrlHelper::get('/') . '"/>' . "\r\n";
     if ($this->favico) {
         $output .= '<link rel="icon" type="' . $this->favico[1] . "\" href=\"" . UrlHelper::resource($this->favico[0]) . "\">\r\n";
     }
     if ($this->description) {
         $output .= '<meta name="description" content="' . HtmlHelper::escape($this->description) . "\" />\r\n";
     }
     if ($this->keywords) {
         $output .= '<meta name="keywords" content="' . HtmlHelper::escape($this->keywords) . "\" />\r\n";
     }
     foreach ($this->feeds as $feed) {
         $output .= '<link rel="alternate" type="application/rss+xml" title="RSS" href="' . UrlHelper::get($feed) . "\" />\r\n";
     }
     foreach ($this->styles as $style) {
         $output .= $html->css($style[0], $style[1]) . "\r\n";
     }
     if ($this->js_library) {
         $output .= "<script type=\"text/javascript\" src=\"{$this->js_library}\"></script>\r\n";
         $output .= $html->javascript('/' . APPU_PHAXSI . '/' . 'phaxsi-' . PhaxsiConfig::FRAMEWORK_VERSION . (AppConfig::DEBUG_MODE ? '' : '.min') . '.js') . "\r\n";
         $output .= HtmlHelper::inlineJavascript("Phaxsi.path = {" . "base: '" . UrlHelper::get('') . "'," . "local: '" . UrlHelper::localized('/') . "'," . "'public': '" . APPU_PUBLIC . "'," . "lang: '" . Lang::getCurrent() . "'}");
     }
     foreach ($this->scripts as $script) {
         $output .= $html->javascript($script) . "\r\n";
     }
     $this->styles = $this->scripts = array();
     return $output;
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:39,代码来源:layout.class.php

示例8: open

 final function open($attributes = array())
 {
     $html_id = $this->_id;
     if (isset($attributes['id'])) {
         $html_id = $attributes['id'];
         unset($attributes['id']);
     }
     $attributes = HtmlHelper::formatAttributes($attributes);
     $validation_script = '';
     if ($this->_client_validation_enabled) {
         $this->enableClientValidation();
         $validation_script = HtmlHelper::inlineJavascript("Phaxsi.Validator.Current = Phaxsi.Validator.List['{$html_id}'] = new Phaxsi.Validator.Manager('{$html_id}');\r\n" . "Phaxsi.Validator.DefaultErrorMessages = " . JsonHelper::encode(Validator::getDefaultErrorMessages()) . ";");
         $this->_javascript .= HtmlHelper::inlineJavascript("Phaxsi.Validator.Current.attachToSubmit();");
     }
     #For xhtml strict compliance
     $target_str = $this->_target == '_self' ? '' : 'target="' . $this->_target . '"';
     return "<form id=\"{$html_id}\" accept-charset=\"" . $this->_charset . "\" action=\"" . HtmlHelper::escape($this->_action) . "\" method=\"{$this->_method}\"  {$attributes} {$target_str} enctype=\"{$this->_enc_type}\">\r\n" . $validation_script;
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:18,代码来源:form.base.php


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