Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / infrastructure / customfield / standard / PhabricatorStandardCustomFieldBlueprints.php
blobad2bb62d817b8ed9510971e2e45af237f3f29537
1 <?php
3 final class PhabricatorStandardCustomFieldBlueprints
4 extends PhabricatorStandardCustomFieldTokenizer {
6 public function getFieldType() {
7 return 'blueprints';
10 public function getDatasource() {
11 return new DrydockBlueprintDatasource();
14 public function applyApplicationTransactionExternalEffects(
15 PhabricatorApplicationTransaction $xaction) {
17 $old = $this->decodeValue($xaction->getOldValue());
18 $new = $this->decodeValue($xaction->getNewValue());
20 DrydockAuthorization::applyAuthorizationChanges(
21 $this->getViewer(),
22 $xaction->getObjectPHID(),
23 $old,
24 $new);
27 public function renderPropertyViewValue(array $handles) {
28 $value = $this->getFieldValue();
29 if (!$value) {
30 return phutil_tag('em', array(), pht('No authorized blueprints.'));
33 return id(new DrydockObjectAuthorizationView())
34 ->setUser($this->getViewer())
35 ->setObjectPHID($this->getObject()->getPHID())
36 ->setBlueprintPHIDs($value);