Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/query/AlmanacServiceSearchEngine.php
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | foreach ($services as $service) { | ||||
->setObjectName(pht('Service %d', $service->getID())) | ->setObjectName(pht('Service %d', $service->getID())) | ||||
->setHeader($service->getName()) | ->setHeader($service->getName()) | ||||
->setHref($service->getURI()) | ->setHref($service->getURI()) | ||||
->setObject($service) | ->setObject($service) | ||||
->addIcon( | ->addIcon( | ||||
$service->getServiceType()->getServiceTypeIcon(), | $service->getServiceType()->getServiceTypeIcon(), | ||||
$service->getServiceType()->getServiceTypeShortName()); | $service->getServiceType()->getServiceTypeShortName()); | ||||
if ($service->getIsLocked() || | |||||
$service->getServiceType()->isClusterServiceType()) { | |||||
if ($service->getIsLocked()) { | |||||
$item->addIcon('fa-lock', pht('Locked')); | |||||
} else { | |||||
$item->addIcon('fa-unlock-alt red', pht('Unlocked')); | |||||
} | |||||
} | |||||
$list->addItem($item); | $list->addItem($item); | ||||
} | } | ||||
$result = new PhabricatorApplicationSearchResultView(); | $result = new PhabricatorApplicationSearchResultView(); | ||||
$result->setObjectList($list); | $result->setObjectList($list); | ||||
$result->setNoDataString(pht('No Almanac Services found.')); | $result->setNoDataString(pht('No Almanac Services found.')); | ||||
return $result; | return $result; | ||||
} | } | ||||
} | } |