Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/almanac/management/AlmanacManagementWorkflow.php
12256 views
1
<?php
2
3
abstract class AlmanacManagementWorkflow
4
extends PhabricatorManagementWorkflow {
5
6
protected function loadServices(array $names) {
7
if (!$names) {
8
return array();
9
}
10
11
$services = id(new AlmanacServiceQuery())
12
->setViewer($this->getViewer())
13
->withNames($names)
14
->execute();
15
16
$services = mpull($services, null, 'getName');
17
foreach ($names as $name) {
18
if (empty($services[$name])) {
19
throw new PhutilArgumentUsageException(
20
pht(
21
'Service "%s" does not exist or could not be loaded!',
22
$name));
23
}
24
}
25
26
return $services;
27
}
28
29
}
30
31