Path: blob/master/src/applications/drydock/customfield/DrydockBlueprintCoreCustomField.php
12256 views
<?php12final class DrydockBlueprintCoreCustomField3extends DrydockBlueprintCustomField4implements PhabricatorStandardCustomFieldInterface {56public function getStandardCustomFieldNamespace() {7return 'drydock:core';8}910public function createFields($object) {11// If this is a generic object without an attached implementation (for12// example, via ApplicationSearch), just don't build any custom fields.13if (!$object->hasImplementation()) {14return array();15}1617$impl = $object->getImplementation();18$specs = $impl->getFieldSpecifications();1920return PhabricatorStandardCustomField::buildStandardFields($this, $specs);21}2223public function shouldUseStorage() {24return false;25}2627public function readValueFromObject(PhabricatorCustomFieldInterface $object) {28$key = $this->getProxy()->getRawStandardFieldKey();29$this->setValueFromStorage($object->getDetail($key));30$this->didSetValueFromStorage();31}3233public function applyApplicationTransactionInternalEffects(34PhabricatorApplicationTransaction $xaction) {35$object = $this->getObject();36$key = $this->getProxy()->getRawStandardFieldKey();3738$this->setValueFromApplicationTransactions($xaction->getNewValue());39$value = $this->getValueForStorage();4041$object->setDetail($key, $value);42}4344public function getBlueprintFieldValue() {45return $this->getProxy()->getFieldValue();46}4748}495051