Пример #1
0
 /**
  * Создание защищенного тега с содержимым
  *
  * @see 	EMTLib::build_safe_tag
  * @param 	string $content
  * @param 	string $tag
  * @param 	array $attribute
  * @return 	string
  */
 protected function tag($content, $tag = 'span', $attribute = array())
 {
     if (isset($attribute['class'])) {
         $classname = $attribute['class'];
         if ($classname == "nowrap") {
             if (!$this->is_on('nowrap')) {
                 $tag = "nobr";
                 $attribute = array();
                 $classname = "";
             }
         }
         if (isset($this->classes[$classname])) {
             $style_inline = $this->classes[$classname];
             if ($style_inline) {
                 $attribute['__style'] = $style_inline;
             }
         }
         $classname = isset($this->class_names[$classname]) ? $this->class_names[$classname] : $classname;
         $classname = ($this->class_layout_prefix ? $this->class_layout_prefix : "") . $classname;
         $attribute['class'] = $classname;
     }
     return EMTLib::build_safe_tag($content, $tag, $attribute, $this->use_layout === false ? EMTLib::LAYOUT_STYLE : $this->use_layout);
 }