/**
  * Internet Explorer Conditional Comment
  *
  * @param string $content
  * @param string|array $condition(s)
  * @param string $operator Can be 'OR' (default) or 'AND'
  * @param bool $global May the content be also defined globally
  * @return mixed The result of the `_echo` function (string or bool)
  * @see _echo()
  * @see Library\Helper\ConditionalComment::buildCondition()
  */
 function _iecc($content, $condition = 'if IE', $operator = 'OR', $global = false)
 {
     return _echo(Helper\ConditionalComment::buildCondition($content, $condition, $operator, $global));
 }
示例#2
0
 /**
  * Write the Template Object strings ready for template display
  *
  * @param string $mask A mask to write each line via "sprintf()"
  * @return string The string to display fot this template object
  */
 public function write($mask = '%s')
 {
     $str = '';
     foreach ($this->cleanStack($this->get(), 'file') as $entry) {
         $tag_attrs = array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $entry['file']);
         if (isset($entry['media']) && !empty($entry['media']) && $entry['media'] != 'screen') {
             $tag_attrs['media'] = $entry['media'];
         }
         $tag = Html::writeHtmlTag('link', null, $tag_attrs, true);
         if (isset($entry['condition']) && !empty($entry['condition'])) {
             $tag = ConditionalComment::buildCondition($tag, $entry['condition']);
         }
         $str .= sprintf($mask, $tag);
     }
     return $str;
 }
示例#3
0
 /**
  * Write the Template Object strings ready for template display
  *
  * @param string $mask A mask to write each line via "sprintf()"
  * @return string The string to display fot this template object
  */
 public function write($mask = '%s')
 {
     $str = '';
     foreach ($this->cleanStack($this->get(), 'name') as $entry) {
         $tag_attrs = array();
         if (true === $entry['http-equiv']) {
             $tag_attrs['http-equiv'] = $entry['name'];
         } else {
             $tag_attrs['name'] = $entry['name'];
         }
         $tag_attrs['content'] = $entry['content'];
         $tag = Html::writeHtmlTag('meta', null, $tag_attrs, true);
         if (isset($entry['condition']) && !empty($entry['condition'])) {
             $tag = ConditionalComment::buildCondition($tag, $entry['condition']);
         }
         $str .= sprintf($mask, $tag);
     }
     return $str;
 }