FOF30\Form\Form::loadCSSFiles PHP Method

loadCSSFiles() public method

Loads the CSS files defined in the form, based on its cssfiles attribute
Since: 2.0
public loadCSSFiles ( ) : void
return void
    public function loadCSSFiles()
    {
        // Support for CSS files
        $cssfiles = $this->getAttribute('cssfiles');
        if (!empty($cssfiles)) {
            $cssfiles = explode(',', $cssfiles);
            foreach ($cssfiles as $cssfile) {
                $this->getView()->addCssFile(trim($cssfile));
            }
        }
        // Support for LESS files
        $lessfiles = $this->getAttribute('lessfiles');
        if (!empty($lessfiles)) {
            $lessfiles = explode(',', $lessfiles);
            foreach ($lessfiles as $def) {
                $parts = explode('||', $def, 2);
                $lessfile = $parts[0];
                $alt = count($parts) > 1 ? trim($parts[1]) : null;
                $this->getView()->addLess(trim($lessfile), $alt);
            }
        }
    }