Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phid/PhabricatorObjectHandle.php
Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Lines | final class PhabricatorObjectHandle | ||||
} | } | ||||
protected function getPHIDType() { | protected function getPHIDType() { | ||||
$types = PhabricatorPHIDType::getAllTypes(); | $types = PhabricatorPHIDType::getAllTypes(); | ||||
return idx($types, $this->getType()); | return idx($types, $this->getType()); | ||||
} | } | ||||
public function hasCapabilities() { | public function hasCapabilities() { | ||||
if (!$this->isComplete()) { | |||||
return false; | |||||
} | |||||
return ($this->getType() === PhabricatorPeopleUserPHIDType::TYPECONST); | return ($this->getType() === PhabricatorPeopleUserPHIDType::TYPECONST); | ||||
} | } | ||||
public function attachCapability( | public function attachCapability( | ||||
PhabricatorPolicyInterface $object, | PhabricatorPolicyInterface $object, | ||||
$capability, | $capability, | ||||
$has_capability) { | $has_capability) { | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |