Ejemplo n.º 1
0
 /**
  * Returns the string representation
  *
  * @return string
  */
 public function __toString()
 {
     try {
         $templateRootElement = $this->getDocumentElement();
         foreach ($templateRootElement->attributes as $name => $attribute) {
             if ('noNamespaceSchemaLocation' === $name) {
                 $this->getDocumentElement()->removeAttributeNode($attribute);
                 break;
             }
         }
         $templateRootElement->removeAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi');
         $this->compiler->compile($templateRootElement, $this->component, $this->component);
         $this->appendLayoutConfiguration();
         $result = $this->compiler->postprocessing($this->template->__toString());
     } catch (\Exception $e) {
         $result = '';
     }
     return $result;
 }
Ejemplo n.º 2
0
 /**
  * Compiles the Element node
  *
  * @param Compiler $compiler
  * @param \DOMElement $node
  * @param UiComponentInterface $component
  * @param Object $context
  * @return void
  */
 public function compile(Compiler $compiler, \DOMElement $node, UiComponentInterface $component, Object $context)
 {
     foreach ($this->getChildNodes($node) as $child) {
         $compiler->compile($child, $component, $context);
     }
 }