interface ThemeCompilerPluginInterface in Theme Compiler 8
An interface that all theme compiler plugins should use.
Hierarchy
- interface \Drupal\theme_compiler\Plugin\ThemeCompilerPluginInterface
Expanded class hierarchy of ThemeCompilerPluginInterface
All classes that implement ThemeCompilerPluginInterface
File
- src/
Plugin/ ThemeCompilerPluginInterface.php, line 8
Namespace
Drupal\theme_compiler\PluginView source
interface ThemeCompilerPluginInterface {
/**
* Compiles and serves a response containing the requested compiler target.
*
* If the request for the compiler target incurs a cache miss, this method
* will be called to generate a cacheable response. Otherwise, Drupal will
* serve the cached response until expiration or invalidation.
*
* Optional parameters are defined entirely by each concrete plugin
* implementation and should be written as distinct parameters on this method.
*
* @param \Drupal\theme_compiler\Plugin\ThemeCompilerTargetContext $context
* The compiler context containing common properties used by most (if not
* all) compilers.
*
* @return \Drupal\Core\Cache\CacheableResponseInterface
* A cacheable response for the requested compiler target.
*/
public function serve(ThemeCompilerTargetContext $context);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ThemeCompilerPluginInterface:: |
public | function | Compiles and serves a response containing the requested compiler target. | 1 |