public function TestDisplayVariant::setTitle in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::setTitle()
- 9 core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::setTitle()
Sets the title for the page being rendered.
Parameters
string|array $title: The page title: either a string for plain titles or a render array for formatted titles.
Return value
$this
Overrides PageVariantInterface::setTitle
File
- core/
modules/ system/ tests/ modules/ display_variant_test/ src/ Plugin/ DisplayVariant/ TestDisplayVariant.php, line 77
Class
- TestDisplayVariant
- Provides a display variant that requires configuration.
Namespace
Drupal\display_variant_test\Plugin\DisplayVariantCode
public function setTitle($title) {
$this->title = $title;
return $this;
}