You are here

public function FrontendEnvironmentBase::deploymentWasTriggered in Build Hooks 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/FrontendEnvironmentBase.php \Drupal\build_hooks\Plugin\FrontendEnvironmentBase::deploymentWasTriggered()

Determine if the deployment was triggered successfully.

Parameters

\Psr\Http\Message\ResponseInterface $response: Response for the trigger request.

Return value

bool TRUE if the deployment succeeded.

Overrides FrontendEnvironmentInterface::deploymentWasTriggered

2 methods override FrontendEnvironmentBase::deploymentWasTriggered()
BitbucketFrontendEnvironment::deploymentWasTriggered in modules/build_hooks_bitbucket/src/Plugin/FrontendEnvironment/BitbucketFrontendEnvironment.php
Determine if the deployment was triggered successfully.
CircleV2::deploymentWasTriggered in modules/build_hooks_circleci/src/Plugin/FrontendEnvironment/CircleV2.php
Determine if the deployment was triggered successfully.

File

src/Plugin/FrontendEnvironmentBase.php, line 194

Class

FrontendEnvironmentBase
Base class for Frontend environment plugins.

Namespace

Drupal\build_hooks\Plugin

Code

public function deploymentWasTriggered(ResponseInterface $response) : bool {
  return in_array($response
    ->getStatusCode(), [
    200,
    201,
  ], FALSE);
}