You are here

public function SharethisWidgetBlock::__construct in ShareThis 8.2

Constructs an SharethisBlock object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\Config $sharethis_settings: The config object for 'sharethis.settings'.

\Drupal\sharethis\SharethisManagerInterface $sharethis_manager: The sharethis manager service.

\Drupal\Core\Config\ConfigFactory $config_factory: The Config factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Routing\CurrentRouteMatch $route_match: The current route match.

\Drupal\Core\Controller\TitleResolverInterface $title_resolver: The title resolver.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/SharethisWidgetBlock.php, line 92

Class

SharethisWidgetBlock
Provides an 'Share this Widget' block.

Namespace

Drupal\sharethis\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, Config $sharethis_settings, SharethisManagerInterface $sharethis_manager, ConfigFactory $config_factory, RequestStack $request_stack, CurrentRouteMatch $route_match, TitleResolverInterface $title_resolver) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->sharethisSettings = $sharethis_settings;
  $this->sharethisManager = $sharethis_manager;
  $this->configFactory = $config_factory;
  $this->requestStack = $request_stack;
  $this->routeMatch = $route_match;
  $this->titleResolver = $title_resolver;
}