You are here

public static function VueBlockDeriver::create in Decoupled Blocks: Vue.js 8

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 PdbBlockDeriver::create

1 call to VueBlockDeriver::create()
VueBlockDeriverTest::testCreate in tests/src/Unit/Plugin/Derivative/VueBlockDeriverTest.php
Tests the create method.

File

src/Plugin/Derivative/VueBlockDeriver.php, line 38

Class

VueBlockDeriver
Derives block plugin definitions for Vue components.

Namespace

Drupal\pdb_vue\Plugin\Derivative

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($container
    ->get('pdb.component_discovery'), $container
    ->get('config.factory'));
}