public function TestEnvironment::getBuildHookDetails in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 tests/modules/build_hooks_test/src/Plugin/FrontendEnvironment/TestEnvironment.php \Drupal\build_hooks_test\Plugin\FrontendEnvironment\TestEnvironment::getBuildHookDetails()
Get the info to trigger the hook based on the configuration of the plugin.
Return value
\Drupal\build_hooks\BuildHookDetails An object containing the details to trigger the hook.
Overrides FrontendEnvironmentInterface::getBuildHookDetails
File
- tests/
modules/ build_hooks_test/ src/ Plugin/ FrontendEnvironment/ TestEnvironment.php, line 32
Class
- TestEnvironment
- Defines a test environment plugin.
Namespace
Drupal\build_hooks_test\Plugin\FrontendEnvironmentCode
public function getBuildHookDetails() {
$details = new BuildHookDetails();
$details
->setOptions([
'hi' => 'there',
]);
$details
->setMethod('POST');
$details
->setUrl('http://example.com?whiz=' . $this->configuration['whiz']);
return $details;
}