示例#1
0
 /**
  * @return string
  */
 function getContent()
 {
     $output = $this->getText();
     if ($this->getAttribute('adm:htmlEditor') !== true) {
         $output = $this->encodePlainText();
         if ($this->getAttribute('forceP')) {
             $output = org_glizy_helpers_Html::forceP($output);
         }
         return $output;
     } else {
         $output = javascript_to_html($output);
         // esegue la paginazione
         if (!is_null($this->getAttribute("paginate"))) {
             $paginateClass =& $this->getAttribute("paginate");
             $this->_content = $paginateClass->splitTextResult($output);
         }
         if ($this->getAttribute('parseInternalLinks')) {
             $output = org_glizy_helpers_Link::parseInternalLinks($output);
         }
         $attributes = array();
         $attributes['id'] = $this->getId();
         $attributes['class'] = $this->getAttribute('cssClass');
         $wrapTag = $this->getAttribute('wrapTag');
         $outputTag = !empty($wrapTag) ? '<' . $wrapTag . ' ' . $this->_renderAttributes($attributes) . '>' : '';
         $outputTag .= $output;
         $outputTag .= !empty($wrapTag) ? '</' . $wrapTag . '>' : '';
         return $outputTag;
     }
 }
示例#2
0
 public function __get($name)
 {
     $value = $this->content->{$name};
     if (is_string($value) && strrpos($value, '<') !== false) {
         // TODO migliorare
         $value = org_glizy_helpers_Link::parseInternalLinks($value);
     }
     return $value;
 }
 private function prepareText($value)
 {
     $value->text = org_glizy_helpers_Link::parseInternalLinks($value->text);
     $value->textAfter = org_glizy_helpers_Link::parseInternalLinks($value->textAfter);
 }