function StubVariantBase::build
Builds and returns the renderable array for the display variant.
The variant can contain cacheability metadata for the configuration that was passed in setConfiguration(). In the build() method, this should be added to the render array that is returned.
Return value
array A render array for the display variant.
Overrides VariantInterface::build
File
-
core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php, line 146
Class
- StubVariantBase
- Provides a basic class extending VariantBase.
Namespace
Drupal\Tests\Core\DisplayCode
public function build() : array {
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.