public function Calendar::init in Calendar 8
Same name in this branch
- 8 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::init()
- 8 src/Plugin/views/row/Calendar.php \Drupal\calendar\Plugin\views\row\Calendar::init()
Same name and namespace in other branches
- 8.2 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::init()
Overrides \Drupal\views\Plugin\views\style\StylePluginBase::init().
The style info is set through the parent function, but we also initialize the date info object here.
Overrides StylePluginBase::init
File
- src/
Plugin/ views/ style/ Calendar.php, line 135
Class
- Calendar
- Views style plugin for the Calendar module.
Namespace
Drupal\calendar\Plugin\views\styleCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
if (empty($view->dateInfo)) {
// @todo This used to say $this->dateInfo. Make sure that what we do here
// is right.
$this->view->dateInfo = new CalendarDateInfo();
$this->view->styleInfo = new CalendarStyleInfo();
}
$this->dateInfo =& $this->view->dateInfo;
$this->styleInfo =& $this->view->styleInfo;
}