/**
  * Render modal
  * @return string
  */
 public function render()
 {
     $template = new Zo2Html();
     $template->set('modal', $this->getModal());
     $template->set('buttons', $this->buttons);
     return $template->fetch('zo2/modal.php');
 }
 public function render()
 {
     $html = new Zo2Html();
     $logo['standard'] = Zo2Framework::getParam('standard_logo');
     $logo['retina'] = Zo2Framework::getParam('retina_logo');
     $html->set('logo', $logo);
     $html->set('slogan', Zo2Framework::getParam('site_slogan'));
     return $html->fetch('zo2/headerlogo.php');
 }
 public static function field()
 {
     $args = func_get_args();
     $type = array_shift($args);
     $label = array_shift($args);
     $data = array_shift($args);
     if (!isset($data['value'])) {
         $data['value'] = isset($data['default']) ? $data['default'] : '';
     }
     $html = new Zo2Html();
     $html->set('label', $label);
     $html->set('data', $data);
     return $html->fetch('fields/' . $type . '.php');
 }
 /**
  * Admin layout builder
  * @return type
  */
 public function builder()
 {
     $assets = Zo2Assets::getInstance();
     $assets->addScript('vendor/bootbox-3.3.0.min.js');
     $assets->addScript('zo2/js/adminlayout.min.js');
     $assets->addStyleSheet('vendor/bootstrap/core/css/bootstrap.gridsystem.css');
     /**
      * @uses    Anything need prepred for display will put here. Do not put process code insite layout template file
      */
     $html = new Zo2Html();
     $params = Zo2Framework::getInstance()->template->params;
     $profile = Zo2Factory::getProfile();
     if (is_object($profile->layout)) {
         $layoutData = $profile->layout->layout;
     } else {
         $layoutData = $profile->layout;
     }
     $html->set('params', $params);
     $html->set('layoutData', $layoutData);
     return $html->fetch('admin/body/sidebar/builder/layout.php');
 }
 public function render()
 {
     $html = new Zo2Html();
     $html->set('showLogo', Zo2Framework::getParam('footer_logo'));
     $html->set('logoUrl', JUri::root(true) . '/plugins/system/zo2/framework/assets/zo2/images/zo2_logo_32x32.png');
     $html->set('copyright', Zo2Framework::getParam('footer_copyright'));
     $html->set('title', 'Zo2 Framework');
     $html->set('link', 'http://www.zootemplate.com/zo2');
     $html->set('gototop', Zo2Framework::getParam('footer_gototop'));
     return $html->fetch('zo2/copyright.php');
 }
 /**
  * Add notice message
  * @param type $message
  * @param type $type
  * @return \Zo2Ajax
  */
 public function addMessage($message, $header = '', $type = 'info')
 {
     switch ($type) {
         case 'error':
         case 'danger':
         case 'alert':
             $messageType = 'error';
             break;
         case 'warning':
             $messageType = 'warning';
             break;
         case 'success':
         case 'message':
         case '':
             $messageType = 'success';
             break;
         default:
             $messageType = 'info';
             break;
     }
     $template = new Zo2Html();
     $template->set('header', $header);
     $template->set('message', $message);
     $template->set('type', $messageType);
     $data = new stdClass();
     $data->message = $template->fetch('zo2/message.php');
     $this->add($data, 'message');
     return $this;
 }