Example #1
0
 /**
  *  HELPER METHODS
  */
 protected static function _element($class = null, $content = null, $args = array())
 {
     if (is_null($content)) {
         $content = isset($args['content']) ? $args['content'] : '';
     }
     return pb::load('html', 'elements/base.php', array('class' => self::_class($class, $args), 'id' => isset($args['id']) ? $args['id'] : '', 'title' => isset($args['title']) ? $args['title'] : '', 'icon' => isset($args['icon']) ? $args['icon'] : false, 'label' => isset($args['label']) ? $args['label'] : false, 'mobile' => isset($args['mobile']) ? $args['mobile'] : 'icon', 'compact' => isset($args['compact']) ? $args['compact'] : false, 'url' => isset($args['url']) ? $args['url'] : false, 'content' => $content));
 }
Example #2
0
 /**
  *  DEFAULTS
  */
 protected function defaults()
 {
     $this->setHooks(array('css' => array(pb::load('css', 'panelbar.css')), 'js' => array('var panelbarKEYS=' . (c::get('panelbar.keys', true) ? 'true;' : 'false;'), pb::load('js', 'panelbar.min.js'))));
     // JS: Responsive
     if (c::get('panelbar.responsive', true)) {
         $this->setHook('js', pb::load('js', 'components' . DS . 'responsive.min.js'));
     }
     // JS: State - localStorage
     if (c::get('panelbar.remember', true)) {
         $this->setHook('js', pb::load('js', 'components' . DS . 'localstorage.min.js'));
     }
 }
Example #3
0
 /**
  *  TOOL: iFrame
  */
 private function _registerIframe()
 {
     if (c::get('panelbar.enhancedJS', true)) {
         // register assets
         $this->assets->setHook('js', pb::load('js', 'components/iframe.min.js'));
         $this->assets->setHook('css', pb::load('css', 'components/iframe.css'));
         // register output
         $this->output->setHook('before', pb::load('html', 'iframe/iframe.php'));
         $this->output->setHook('elements', pb::load('html', 'iframe/btn.php'));
     }
 }
Example #4
0
 public function get()
 {
     return pb::load('html', 'main.php', array('class' => 'panelbar panelbar--' . $this->position . ($this->visible === false ? ' panelbar--hidden' : ''), 'before' => $this->getHooks('before'), 'elements' => $this->getHooks('elements'), 'after' => $this->getHooks('after')));
 }
Example #5
0
 protected function _controls()
 {
     $this->output->setHook('after', pb::load('html', 'controls.php'));
 }