interface CriticalCssProviderInterface in Critical CSS 8
Defines an interface for a Critical CSS Provider.
Classes implementing this interface calculate which CSS file must be used for Critical CSS and return its contents.
Hierarchy
- interface \Drupal\critical_css\Asset\CriticalCssProviderInterface
Expanded class hierarchy of CriticalCssProviderInterface
All classes that implement CriticalCssProviderInterface
File
- src/
Asset/ CriticalCssProviderInterface.php, line 11
Namespace
Drupal\critical_css\AssetView source
interface CriticalCssProviderInterface {
/**
* Get critical CSS contents.
*
* @return string
* The critical CSS contents
*/
public function getCriticalCss();
/**
* Get all possible paths to search, relatives to theme.
*
* @return array
* Array with all possible paths.
*/
public function getFilePaths();
/**
* Get matched file path.
*
* @return string|null
* Matched file path, or null if nothing found.
*/
public function getMatchedFilePath();
/**
* Check if module is enabled.
*
* @return bool
* True if this module is enabled
*/
public function isEnabled();
/**
* Tells whether this request has been already processed.
*
* @return bool
* True if already processed, false otherwise.
*/
public function isAlreadyProcessed();
/**
* Reset provider so calculations are made again.
*/
public function reset();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CriticalCssProviderInterface:: |
public | function | Get critical CSS contents. | 1 |
CriticalCssProviderInterface:: |
public | function | Get all possible paths to search, relatives to theme. | 1 |
CriticalCssProviderInterface:: |
public | function | Get matched file path. | 1 |
CriticalCssProviderInterface:: |
public | function | Tells whether this request has been already processed. | 1 |
CriticalCssProviderInterface:: |
public | function | Check if module is enabled. | 1 |
CriticalCssProviderInterface:: |
public | function | Reset provider so calculations are made again. | 1 |