function deploy_endpoint_create in Deploy - Content Staging 7.3
Same name and namespace in other branches
- 7.2 deploy.module \deploy_endpoint_create()
Object factory for a deployment endpoint.
1 string reference to 'deploy_endpoint_create'
- deploy_schema in ./
deploy.install - Implements hook_schema().
File
- ./
deploy.module, line 391 - Deploy module functions.
Code
function deploy_endpoint_create($schema, $item) {
$endpoint = new DeployEndpoint();
// Unserialize our serialized params.
foreach ($schema['fields'] as $field => $info) {
if (!empty($info['serialize'])) {
$endpoint->{$field} = unserialize($item->{$field});
}
else {
$endpoint->{$field} = $item->{$field};
}
}
return $endpoint;
}