You are here

public static function DashboardBlock::create in Dashboards with Layout Builder 2.0.x

Same name in this branch
  1. 2.0.x src/Plugin/Derivative/DashboardBlock.php \Drupal\dashboards\Plugin\Derivative\DashboardBlock::create()
  2. 2.0.x src/Plugin/Block/DashboardBlock.php \Drupal\dashboards\Plugin\Block\DashboardBlock::create()
Same name and namespace in other branches
  1. 8 src/Plugin/Derivative/DashboardBlock.php \Drupal\dashboards\Plugin\Derivative\DashboardBlock::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

src/Plugin/Derivative/DashboardBlock.php, line 54

Class

DashboardBlock
Provides block plugin definitions for dashboard blocks.

Namespace

Drupal\dashboards\Plugin\Derivative

Code

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