function ExampleMeatballSandwich::__construct

Same name in other branches
  1. 3.x modules/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php \Drupal\plugin_type_example\Plugin\Sandwich\ExampleMeatballSandwich::__construct()
  2. 4.0.x modules/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php \Drupal\plugin_type_example\Plugin\Sandwich\ExampleMeatballSandwich::__construct()

File

plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php, line 76

Class

ExampleMeatballSandwich
Provides a meatball sandwich.

Namespace

Drupal\plugin_type_example\Plugin\Sandwich

Code

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);
}