function ExampleMeatballSandwich::description
Same name in other branches
- 3.x modules/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php \Drupal\plugin_type_example\Plugin\Sandwich\ExampleMeatballSandwich::description()
Overrides SandwichBase::description
File
-
modules/
plugin_type_example/ src/ Plugin/ Sandwich/ ExampleMeatballSandwich.php, line 97
Class
- ExampleMeatballSandwich
- Provides a meatball sandwich.
Namespace
Drupal\plugin_type_example\Plugin\SandwichCode
public function description() {
// We override the description() method in order to change the description
// text based on the date. On Sunday we only have day old bread.
if ($this->day == 'Sun') {
return $this->t("Italian style meatballs drenched in irresistible marinara sauce, served on day old bread.");
}
return parent::description();
}