public function CircleCiManager::getBuildHookDetailsForPluginConfiguration in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 modules/build_hooks_circleci/src/CircleCiManager.php \Drupal\build_hooks_circleci\CircleCiManager::getBuildHookDetailsForPluginConfiguration()
Returns the build hooks details based on plugin configuration.
Parameters
array $config: The plugin configuration array.
Return value
\Drupal\build_hooks\BuildHookDetails Build hooks detail object with info about the request to make.
Overrides CircleCiManagerInterface::getBuildHookDetailsForPluginConfiguration
File
- modules/
build_hooks_circleci/ src/ CircleCiManager.php, line 89
Class
- CircleCiManager
- Defines a service for managing Circle CI deployments.
Namespace
Drupal\build_hooks_circleciCode
public function getBuildHookDetailsForPluginConfiguration(array $config) {
$buildHookDetails = new BuildHookDetails();
$buildHookDetails
->setUrl($this
->buildCircleCiApiBuildUrlForEnvironment($config));
$buildHookDetails
->setMethod('POST');
$buildHookDetails
->setOptions([
'json' => [
'branch' => $config['branch'],
],
]);
return $buildHookDetails;
}