function addCssFile($path, $media = 'screen') { if (substr($path, 0, 4) != 'http') { if (strpos($path, '/') === false) { $path = \GCore\Helpers\Assets::css($path); } else { //relative file path provided $path = $this->url . $path; } } if (!in_array($path, (array) Arr::getVal($this->cssfiles, array('[n]', 'href')))) { $this->cssfiles[] = array('href' => $path, 'media' => $media, 'rel' => 'stylesheet', 'type' => 'text/css'); } }
public static function loadFiles() { $doc = \GCore\Libs\Document::getInstance(); $doc->_('jquery'); $doc->addJsFile(\GCore\Helpers\Assets::js('toolbar', '')); $doc->addCssFile(\GCore\Helpers\Assets::css('toolbar', '')); }
public function getNav($lang = array()) { if ($this->total <= $this->limit) { return ''; } $first = $this->getFirst($lang); $prev = $this->getPrevious($lang); $numbers = $this->getNumbers($lang); $next = $this->getNext($lang); $last = $this->getLast($lang); $full = $this->full_nav($first, $prev, $numbers, $next, $last); //add css file $doc = \GCore\Libs\Document::getInstance(); $doc->addCssFile(\GCore\Helpers\Assets::css('paginator')); return $full; }