You are here

public static function WebformOptionsCustomDeriverBase::create in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_options_custom/src/Plugin/Derivative/WebformOptionsCustomDeriverBase.php \Drupal\webform_options_custom\Plugin\Derivative\WebformOptionsCustomDeriverBase::create()

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

modules/webform_options_custom/src/Plugin/Derivative/WebformOptionsCustomDeriverBase.php, line 45

Class

WebformOptionsCustomDeriverBase
Provides base class for webform custom options derivers.

Namespace

Drupal\webform_options_custom\Plugin\Derivative

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($container
    ->get('entity_type.manager')
    ->getStorage('webform_options_custom'));
}