Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/query/PhabricatorPolicyQuery.php
Show All 37 Lines | foreach ($map as $capability => $phid) { | ||||
$results[$capability] = $policies[$phid]; | $results[$capability] = $policies[$phid]; | ||||
} | } | ||||
return $results; | return $results; | ||||
} | } | ||||
public static function renderPolicyDescriptions( | public static function renderPolicyDescriptions( | ||||
PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
PhabricatorPolicyInterface $object, | PhabricatorPolicyInterface $object) { | ||||
$icon = false) { | |||||
$policies = self::loadPolicies($viewer, $object); | $policies = self::loadPolicies($viewer, $object); | ||||
foreach ($policies as $capability => $policy) { | foreach ($policies as $capability => $policy) { | ||||
$policies[$capability] = $policy->renderDescription($icon); | $policies[$capability] = $policy->renderDescription(); | ||||
} | } | ||||
return $policies; | return $policies; | ||||
} | } | ||||
protected function loadPage() { | protected function loadPage() { | ||||
if ($this->object && $this->phids) { | if ($this->object && $this->phids) { | ||||
throw new Exception( | throw new Exception( | ||||
▲ Show 20 Lines • Show All 368 Lines • Show Last 20 Lines |