public function RulesHttpClient::__construct in Rules HTTP Client 8
Constructs a httpClient 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\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory service.
GuzzleHttp\ClientInterface $http_client: The guzzle http client instance.
Overrides ContextAwarePluginBase::__construct
File
- src/
Plugin/ RulesAction/ RulesHttpClient.php, line 97
Class
- RulesHttpClient
- Provides "Rules Http client" rules action.
Namespace
Drupal\rules_http_client\Plugin\RulesActionCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger_factory, ClientInterface $http_client) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->logger = $logger_factory
->get('rules_http_client');
$this->http_client = $http_client;
}