function ExampleMeatballSandwich::__construct
Same name in other branches
- 8.x-1.x plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php \Drupal\plugin_type_example\Plugin\Sandwich\ExampleMeatballSandwich::__construct()
- 4.0.x modules/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php \Drupal\plugin_type_example\Plugin\Sandwich\ExampleMeatballSandwich::__construct()
Overrides PluginBase::__construct
File
-
modules/
plugin_type_example/ src/ Plugin/ Sandwich/ ExampleMeatballSandwich.php, line 76
Class
- ExampleMeatballSandwich
- Provides a meatball sandwich.
Namespace
Drupal\plugin_type_example\Plugin\SandwichCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translation) {
// Store the translation service.
$this->setStringTranslation($translation);
// Store the day so we can generate a special description on Sundays.
$this->day = date('D');
// Pass the other parameters up to the parent constructor.
parent::__construct($configuration, $plugin_id, $plugin_definition);
}