function UpdateServerProjectInfo::createFromArray
Same name and namespace in other branches
- 11.x core/modules/update/src/UpdateServerProjectInfo.php \Drupal\update\UpdateServerProjectInfo::createFromArray()
Creates a UpdateServerProjectInfo object.
Parameters
array $data: The project data from the Update XML.
Return value
static
1 call to UpdateServerProjectInfo::createFromArray()
- UpdateManager::calculateProjectData in core/
modules/ update/ src/ UpdateManager.php
File
-
core/
modules/ update/ src/ UpdateServerProjectInfo.php, line 66
Class
- UpdateServerProjectInfo
- Update server project information.
Namespace
Drupal\updateCode
public static function createFromArray(array $data) : static {
$data['supported_branches'] ??= [];
return new UpdateServerProjectInfo($data['project_status'] ?? NULL, $data['supported_branches'] ? explode(',', $data['supported_branches']) : [], $data['releases'] ?? [], $data['title'] ?? '', $data['link'] ?? '', $data['fetch_status'] ?? NULL, $data['last_fetch'] ?? NULL, $data['short_name'] ?? NULL, $data['terms'] ?? NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.