Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/HarbormasterBuildMessage.php
| Show All 11 Lines | final class HarbormasterBuildMessage extends HarbormasterDAO | ||||
| protected $authorPHID; | protected $authorPHID; | ||||
| protected $buildTargetPHID; | protected $buildTargetPHID; | ||||
| protected $type; | protected $type; | ||||
| protected $isConsumed; | protected $isConsumed; | ||||
| private $buildTarget = self::ATTACHABLE; | private $buildTarget = self::ATTACHABLE; | ||||
| public static function initializeNewMessage(PhabricatorUser $actor) { | public static function initializeNewMessage(PhabricatorUser $actor) { | ||||
| $actor_phid = $actor->getPHID(); | |||||
| if (!$actor_phid) { | |||||
| $actor_phid = id(new PhabricatorHarbormasterApplication())->getPHID(); | |||||
| } | |||||
| return id(new HarbormasterBuildMessage()) | return id(new HarbormasterBuildMessage()) | ||||
| ->setAuthorPHID($actor->getPHID()) | ->setAuthorPHID($actor_phid) | ||||
| ->setIsConsumed(0); | ->setIsConsumed(0); | ||||
| } | } | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'type' => 'text16', | 'type' => 'text16', | ||||
| 'isConsumed' => 'bool', | 'isConsumed' => 'bool', | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||