HandleRequiredFeaturesTrait
trait HandleRequiredFeaturesTrait (View source)
Methods
void
handleRequiredFeatures(mixed $controller, Theme $theme)
Given a block or page controller that we're rendering, we request all the features required by that block controller and then add them to the page's header/footer via requireAsset, if they're not already provided by the theme (which we check via getThemeSupportedFeatures)
void
requireFeaturesIfNotPresentInTheme(array $features, Theme $theme)
Requires one or more features if not present in theme.
Details
protected void
handleRequiredFeatures(mixed $controller, Theme $theme)
Given a block or page controller that we're rendering, we request all the features required by that block controller and then add them to the page's header/footer via requireAsset, if they're not already provided by the theme (which we check via getThemeSupportedFeatures)
protected void
requireFeaturesIfNotPresentInTheme(array $features, Theme $theme)
Requires one or more features if not present in theme.