Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/storage/PhabricatorAuthMessage.php
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | final class PhabricatorAuthMessage | ||||
| public function getMessageType() { | public function getMessageType() { | ||||
| return $this->assertAttached($this->messageType); | return $this->assertAttached($this->messageType); | ||||
| } | } | ||||
| public function getMessageTypeDisplayName() { | public function getMessageTypeDisplayName() { | ||||
| return $this->getMessageType()->getDisplayName(); | return $this->getMessageType()->getDisplayName(); | ||||
| } | } | ||||
| public static function loadMessageText( | |||||
| PhabricatorUser $viewer, | |||||
| $message_key) { | |||||
| $message = id(new PhabricatorAuthMessageQuery()) | |||||
| ->setViewer($viewer) | |||||
| ->withMessageKeys(array($message_key)) | |||||
| ->executeOne(); | |||||
| if (!$message) { | |||||
| return null; | |||||
| } | |||||
| return $message->getMessageText(); | |||||
| } | |||||
| /* -( PhabricatorPolicyInterface )----------------------------------------- */ | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
| public function getCapabilities() { | public function getCapabilities() { | ||||
| return array( | return array( | ||||
| PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
| PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||