You are here

public function Calendar::__construct in Calendar 8

Same name in this branch
  1. 8 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::__construct()
  2. 8 src/Plugin/views/row/Calendar.php \Drupal\calendar\Plugin\views\row\Calendar::__construct()
Same name and namespace in other branches
  1. 8.2 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::__construct()

Constructs a Calendar object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Datetime\DateFormatter $date_formatter: The date formatter service.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Component\Datetime\TimeInterface $time: The time interface.

Overrides PluginBase::__construct

File

src/Plugin/views/style/Calendar.php, line 163

Class

Calendar
Views style plugin for the Calendar module.

Namespace

Drupal\calendar\Plugin\views\style

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatter $date_formatter, MessengerInterface $messenger, TimeInterface $time) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->definition = $plugin_definition + $configuration;
  $this->dateFormatter = $date_formatter;
  $this->messenger = $messenger;
  $this->time = $time;
}