You are here

public function ThemeCompilerPluginInterface::serve in Theme Compiler 8

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.

Parameters

\Drupal\theme_compiler\Plugin\ThemeCompilerTargetContext $context: The compiler context containing common properties used by most (if not all) compilers.

Return value

\Drupal\Core\Cache\CacheableResponseInterface A cacheable response for the requested compiler target.

1 method overrides ThemeCompilerPluginInterface::serve()
ThemeCompilerController::serve in src/Controller/ThemeCompilerController.php
Compiles and serves a response containing the requested compiler target.

File

src/Plugin/ThemeCompilerPluginInterface.php, line 27

Class

ThemeCompilerPluginInterface
An interface that all theme compiler plugins should use.

Namespace

Drupal\theme_compiler\Plugin

Code

public function serve(ThemeCompilerTargetContext $context);