public static function TBMegaMenuBlock::create in The Better Mega Menu 2.x
Same name in this branch
- 2.x src/Plugin/Derivative/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Derivative\TBMegaMenuBlock::create()
- 2.x src/Plugin/Block/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Block\TBMegaMenuBlock::create()
Same name and namespace in other branches
- 8 src/Plugin/Derivative/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Derivative\TBMegaMenuBlock::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/ TBMegaMenuBlock.php, line 45
Class
- TBMegaMenuBlock
- Provides blocks which belong to TB Mega Menu.
Namespace
Drupal\tb_megamenu\Plugin\DerivativeCode
public static function create(ContainerInterface $container, $base_plugin_id) {
return new static($container
->get('config.factory'), $container
->get('entity_type.manager'));
}