WidgetFactory.php

Definition of Drupal\field\Plugin\WidgetFactory.

Namespace

Drupal\field\Plugin\Type\Widget

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetFactory.php
View source
<?php

/**
 * @file
 * Definition of Drupal\field\Plugin\WidgetFactory.
 */
namespace Drupal\field\Plugin\Type\Widget;

use Drupal\Component\Plugin\Factory\DefaultFactory;

/**
 * Factory class for the Widget plugin type.
 */
class WidgetFactory extends DefaultFactory {

  /**
   * Overrides Drupal\Component\Plugin\Factory\DefaultFactory::createInstance().
   */
  public function createInstance($plugin_id, array $configuration) {
    $plugin_class = $this
      ->getPluginClass($plugin_id);
    return new $plugin_class($plugin_id, $this->discovery, $configuration['instance'], $configuration['settings'], $configuration['weight']);
  }

}

Classes

Namesort descending Description
WidgetFactory Factory class for the Widget plugin type.