public function DeployEndpoint::publish in Deploy - Content Staging 7.3
Same name and namespace in other branches
- 7.2 includes/DeployEndpoint.inc \DeployEndpoint::publish()
Publishes all entities on the endpoint. Happens after deployment.
Parameters
string $lock_name: The name of the lock that this deployment is working under.
integer $deployment_key: The unique deployment key for this deployment.
Traversable $iterator: Usually this will be an object from a subclass of DeployAggregatorBase.
string $lock_name: Optional name of the lock that this deployment is working under.
File
- includes/
DeployEndpoint.inc, line 123 - Base class for Deploy endpoint definitions.
Class
- DeployEndpoint
- Class representing a deployment endpoint.
Code
public function publish($deployment_key, Traversable $iterator, $lock_name = NULL) {
try {
if (empty($this->authenticator)) {
$this
->load();
}
// Consider going through the authenticator here, as in self::deploy().
$this->service
->publish($iterator);
deploy_log($deployment_key, DEPLOY_STATUS_PUBLISHED);
module_invoke_all('deploy_plan_publish', DEPLOY_STATUS_PUBLISHED);
} catch (Exception $e) {
if (!empty($lock_name)) {
lock_release($lock_name);
}
deploy_log($deployment_key, DEPLOY_STATUS_FAILED, $e);
module_invoke_all('deploy_plan_publish', DEPLOY_STATUS_FAILED);
throw $e;
}
}