/** * getCSS * * get the stylesheet to show selection box. * * @param type $method * @return type */ public function getCSS($method) { $array_css = parent::getCSS($method); $local_css = CSS::getPath('01-jquery-ui.css'); $array_css[] = $local_css; return $array_css; }
public function getCSS($method, $returnFormat = 'array', $compress = false) { $class = end(explode('\\', $this->getClass())); // gets component's css file $local_css = CSS::getPath("{$class}.{$method}.css"); $a_css = $local_css ? array($local_css) : array(); // adds foreach ($this->dataAttributes() as $data) { foreach ($this->{'O' . $data}()->getCSS($method) as $local_css) { if ($local_css) { $a_css[] = $local_css; } } } $a_css = array_unique($a_css); sort($a_css); // includes libs $a_css = array_unique(array_merge($a_css, CSS::getLibs())); if ($compress) { // @todo: compress in one file and return the file path } // converts to remote paths $a_css = array_map(array('\\SimplOn\\Main', 'localToRemotePath'), $a_css); switch ($returnFormat) { case 'html': $html_css = ''; foreach ($a_css as $css) { $html_css .= '<link type="text/css" rel="stylesheet" href="' . $css . '" />' . "\n"; } return $html_css; default: case 'array': return $a_css; } }
public function getCSS($method) { if ($this->hasMethod($method)) { $class = end(explode('\\', $this->getClass())); return array(CSS::getPath("{$class}.{$method}.css")); } else { return array(); } }