AssetManager::registerCssFile PHP Method

registerCssFile() public method

Register an application style.
public registerCssFile ( string $style = '', null | string | false $basePathAlias = null, null | integer $priority = null, $output = self::OUTPUT_ALL, boolean $preRegister = true )
$style string The style path. Eg: 'css/style.css'
$basePathAlias null | string | false The alias for the basepath. Eg: 'application.modules.mymodule.assets'
$priority null | integer The priority for the asset. Higher priority styles will be outputted in the page first.
$preRegister boolean Pre-register the asset (if set to false, priority and output will be ignored)
    public function registerCssFile($style = '', $basePathAlias = null, $priority = null, $output = self::OUTPUT_ALL, $preRegister = true)
    {
        $priority = $priority !== null ? $priority : $this->cssPriority--;
        $path = $this->createUrl($style, $basePathAlias, false);
        if ($preRegister) {
            $this->addOrderedCssFile($path, $priority, $output);
        } elseif ($this->canOutput($output)) {
            $this->clientScript->registerCssFile($path);
        }
    }