You are here

public function InstagramBlockBlock::__construct in Instagram Block 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Block/InstagramBlockBlock.php \Drupal\instagram_block\Plugin\Block\InstagramBlockBlock::__construct()
  2. 8.2 src/Plugin/Block/InstagramBlockBlock.php \Drupal\instagram_block\Plugin\Block\InstagramBlockBlock::__construct()

Constructs a InstagramBlockBlock object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\GuzzleHttp\Client $http_client: The Guzzle HTTP client.

ConfigFactory $config_factory: The factory for configuration objects.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/InstagramBlockBlock.php, line 58
Contains \Drupal\instagram_block\Plugin\Block\InstagramBlockBlock.

Class

InstagramBlockBlock
Provides an Instagram block.

Namespace

Drupal\instagram_block\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, Client $http_client, ConfigFactory $config_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->httpClient = $http_client;
  $this->configFactory = $config_factory;
}