getID(); } public function getConfiguration() { return array( self::CONFIG_AUX_PHID => true, ) + parent::getConfiguration(); } public function generatePHID() { return PhabricatorPHID::generateNewPHID( PhabricatorPHIDConstants::PHID_TYPE_PSTE); } public function getCapabilities() { return array( PhabricatorPolicyCapability::CAN_VIEW, PhabricatorPolicyCapability::CAN_EDIT, ); } public function getPolicy($capability) { if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { return PhabricatorPolicies::POLICY_USER; } return PhabricatorPolicies::POLICY_NOONE; } public function hasAutomaticCapability($capability, PhabricatorUser $user) { return ($user->getPHID() == $this->getAuthorPHID()); } public function getFullName() { $title = $this->getTitle(); if (!$title) { $title = '(An Untitled Masterwork)'; } return 'P'.$this->getID().' '.$title; } public function getContent() { if ($this->content === null) { throw new Exception("Call attachContent() before getContent()!"); } return $this->content; } public function attachContent($content) { $this->content = $content; return $this; } }