You are here

public function FullcalendarManager::createInstance in FullCalendar 8

Same name and namespace in other branches
  1. 8.5 src/Plugin/FullcalendarManager.php \Drupal\fullcalendar\Plugin\FullcalendarManager::createInstance()
  2. 8.2 src/Plugin/FullcalendarManager.php \Drupal\fullcalendar\Plugin\FullcalendarManager::createInstance()
  3. 8.3 src/Plugin/FullcalendarManager.php \Drupal\fullcalendar\Plugin\FullcalendarManager::createInstance()
  4. 8.4 src/Plugin/FullcalendarManager.php \Drupal\fullcalendar\Plugin\FullcalendarManager::createInstance()

Return value

\Drupal\fullcalendar\Plugin\FullcalendarInterface

Overrides PluginManagerBase::createInstance

File

src/Plugin/FullcalendarManager.php, line 42

Class

FullcalendarManager
Plugin type manager for FullCalendar plugins.

Namespace

Drupal\fullcalendar\Plugin

Code

public function createInstance($plugin_id, array $configuration = [], $style = NULL) {
  $plugin = parent::createInstance($plugin_id, $configuration);
  if ($style) {
    $plugin
      ->setStyle($style);
  }
  return $plugin;
}