FOF30\View\View::addLess PHP Method

addLess() public method

This method has integrated cache support. The compiled LESS files will be written to the media/lib_fof/compiled directory of your site. If the file cannot be written we will use the $cssUri, if specified
public addLess ( string $uri, string $cssUri, string $version = null, string $type = 'text/css', string $media = null, array $attribs = [] )
$uri string A path definition understood by parsePath pointing to the source LESS file, e.g. media://com_example/less/foo.less
$cssUri string A path definition understood by parsePath pointing to a precompiled CSS file, used when we can't write the generated file to the output directory, e.g. media://com_example/css/foo.css
$version string (optional) Version string to be added to the URL
$type string MIME type of the stylesheeet
$media string Media target definition of the style sheet, e.g. "screen"
$attribs array Array of attributes
    public function addLess($uri, $cssUri, $version = null, $type = 'text/css', $media = null, $attribs = array())
    {
        // Add an automatic version if $version is null. For no version parameter pass an empty string to $version.
        if (is_null($version)) {
            $version = $this->container->mediaVersion;
        }
        $this->container->template->addLESS($uri, $cssUri, false, $version, $type, $media, $attribs);
        return $this;
    }