PHP Class Craft\MinimeeTwigExtension

Inheritance: extends Twig_Extension
Afficher le fichier Open project: johndwells/craft.minimee

Méthodes publiques

Méthode Description
getFilters ( ) : Array Return an array of twig filters
getGlobals ( ) : Array Inject into the template scope a read-only copy of Minimee's runtime settings
getName ( ) : String Name of our twig filter
minimeeFilter ( String $html, Array $settings = [] ) : String Define our filter

Méthodes protégées

Méthode Description
detectType ( $html = '' ) Quick string detection to determine type
pregMatchAssetsByType ( $type, $haystack ) : boolean | array Helper function to parse content looking for CSS and JS tags.

Method Details

detectType() protected méthode

Quick string detection to determine type
protected detectType ( $html = '' )

getFilters() public méthode

Return an array of twig filters
public getFilters ( ) : Array
Résultat Array

getGlobals() public méthode

Inject into the template scope a read-only copy of Minimee's runtime settings
public getGlobals ( ) : Array
Résultat Array

getName() public méthode

Name of our twig filter
public getName ( ) : String
Résultat String

minimeeFilter() public méthode

Define our filter
public minimeeFilter ( String $html, Array $settings = [] ) : String
$html String
$settings Array
Résultat String

pregMatchAssetsByType() protected méthode

Returns array of links found.
protected pregMatchAssetsByType ( $type, $haystack ) : boolean | array
Résultat boolean | array Array of found matches, or false if none