public function __construct($name, $style = 'default', $format = null) { $this->setName($name); $this->setStyle($style); $base = LAYOUT_DIR . $this->getName() . '/'; $action = $this->getStyle(); if (!$format) { $format = Ajde_Http_Request::isAjax() && $this->exist($base, $action, 'ajax') || Ajde::app()->getDocument()->getFormat() === 'ajax' ? 'ajax' : 'html'; } parent::__construct($base, $action, $format); }
public function __construct($name, $style = 'default', $format = null) { $this->setName($name); $this->setStyle($style); $base = LAYOUT_DIR . $this->getName() . DIRECTORY_SEPARATOR; $action = $this->getStyle(); if (!$format) { if (Ajde_Http_Request::isAjax() && $this->exist($base, $action, 'ajax') || Ajde::app()->getDocument()->getFormat() === 'ajax') { $format = 'ajax'; } else { if (Ajde::app()->getDocument()->getFormat() === 'crud') { $format = 'crud'; } else { $format = 'html'; } } } parent::__construct($base, $action, $format); }