Exemple #1
0
 /**
  * Accepts an ElementNode that is defined by this CodeDefinition and returns the HTML markup of the element.
  * This is a commonly overridden class for custom CodeDefinitions so that the content can be directly manipulated.
  * 
  * @param el the element to return an html representation of
  * 
  * @return the parsed html of this element (INCLUDING ITS CHILDREN)
  */
 public function asHtml(WM_BBCode_ElementNode $el)
 {
     $html = $this->getReplacementText();
     if ($this->usesOption()) {
         $html = str_ireplace('{option}', $el->getAttribute(), $html);
     }
     if ($this->parseContent()) {
         $content = "";
         foreach ($el->getChildren() as $child) {
             $content .= $child->getAsHTML();
         }
     } else {
         $content = "";
         foreach ($el->getChildren() as $child) {
             $content .= $child->getAsBBCode();
         }
     }
     $html = str_ireplace('{param}', $content, $html);
     return $html;
 }