public function setFormat(Format $format = NULL)
 {
     if (isset($format)) {
         // only XSLT format for templates
         if ($format->getType() != c\T::XSLTFORMAT) {
             throw new \Exception(S_SPAN . "Wrong type of format." . E_SPAN);
         }
         $this->getProperty()->formatId = $format->getId();
         $this->getProperty()->formatPath = $format->getPath();
     } else {
         $this->getProperty()->formatId = NULL;
         $this->getProperty()->formatPath = NULL;
     }
     return $this;
 }
 public function setFormat(a\Format $format = NULL)
 {
     if (isset($format)) {
         if ($this->type != c\T::PAGE && $format->getType() != c\T::XSLTFORMAT) {
             throw new \Exception(S_SPAN . "Wrong type of format." . E_SPAN);
         }
         $this->format_id = $format->getId();
         $this->format_path = $format->getPath();
     } else {
         $this->format_id = NULL;
         $this->format_path = NULL;
     }
     return $this;
 }