PHP Class TitanFrameworkCSS

Author: Benjamin Intal
Afficher le fichier Open project: gambitph/titan-framework Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( TitanFramework $frameworkInstance ) : void Class constructor
_generateMissingCSS ( ) : void When the no options are saved yet (e.g. new install) create a CSS, called internally
addCSS ( string $cssString ) : void Adds a CSS string to the list for CSS generation
enqueueCSS ( ) : void Enqueues the generated CSS. Used IF the CSS file was successfully generated
generateCSS ( ) : string Generates a CSS string of all the options
generateMissingCSS ( ) : void When the no options are saved yet (e.g. new install) create a CSS
generateSaveCSS ( ) : void Generates a the CSS file containing all the rules assigned to options, or created using the TitanFramework->createCSS( '.
getOptionsWithCSS ( TitanFrameworkOption $option ) : void Gathers all options with IDs for generation of CSS rules
printCSS ( ) : void Prints the styles in the head tag. Used IF the CSS file could not be generated

Private Methods

Méthode Description
formCSSVariables ( string $id, $type, string $value, mixes $key = false, string $cssString = '' ) : string Forms CSS rules containing SaSS variables
getCSSFilePath ( ) : string Returns the path of the generated CSS file
getCSSFileURL ( ) : string Returns the URL of the generated CSS file
getCSSSlug ( ) : string Generates a unique slug for our CSS generation
writeCSS ( $parsedCSS, $cssFilename ) : boolean Writes the CSS file

Method Details

__construct() public méthode

Class constructor
Since: 1.2
public __construct ( TitanFramework $frameworkInstance ) : void
$frameworkInstance TitanFramework an instance of the framework object
Résultat void

_generateMissingCSS() public méthode

When the no options are saved yet (e.g. new install) create a CSS, called internally
Since: 1.4.1
public _generateMissingCSS ( ) : void
Résultat void

addCSS() public méthode

Adds a CSS string to the list for CSS generation
Since: 1.2
public addCSS ( string $cssString ) : void
$cssString string string CSS, can contain SaSS variables of optionIDs
Résultat void

enqueueCSS() public méthode

Enqueues the generated CSS. Used IF the CSS file was successfully generated
Since: 1.2
public enqueueCSS ( ) : void
Résultat void

generateCSS() public méthode

Generates a CSS string of all the options
Since: 1.2
public generateCSS ( ) : string
Résultat string A CSS string of all the values

generateMissingCSS() public méthode

When the no options are saved yet (e.g. new install) create a CSS
Since: 1.4.1
public generateMissingCSS ( ) : void
Résultat void

generateSaveCSS() public méthode

..' ) function.
Since: 1.3
public generateSaveCSS ( ) : void
Résultat void

getOptionsWithCSS() public méthode

Gathers all options with IDs for generation of CSS rules
Since: 1.2
public getOptionsWithCSS ( TitanFrameworkOption $option ) : void
$option TitanFrameworkOption The option which was just added
Résultat void

printCSS() public méthode

Prints the styles in the head tag. Used IF the CSS file could not be generated
Since: 1.2
public printCSS ( ) : void
Résultat void