Ejemplo n.º 1
0
 public function create($isAjax = false)
 {
     parent::create();
     if (!$this->callback) {
         throw new Mesour\InvalidStateException('Callback is required for string content.');
     }
     if (!$isAjax && $this->getParent()->hasAjaxLoading()) {
         return '';
     }
     $this->onRender($this);
     return Mesour\Components\Utils\Helpers::invokeArgs($this->callback, [$this]);
 }
Ejemplo n.º 2
0
 public function create($isAjax = false)
 {
     parent::create();
     if (!$isAjax && $this->getParent()->hasAjaxLoading()) {
         return '';
     }
     $template = $this->getTemplateFile();
     if ($this->callback) {
         Mesour\Components\Utils\Helpers::invokeArgs($this->callback, [$this, $template]);
     }
     $this->onRender($this, $template);
     return $template->render(true);
 }