Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/editor/AlmanacPropertyEditEngine.php
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | abstract class AlmanacPropertyEditEngine | ||||
| } | } | ||||
| protected function getObjectCreateShortText() { | protected function getObjectCreateShortText() { | ||||
| return pht('Create Property'); | return pht('Create Property'); | ||||
| } | } | ||||
| protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
| $property_key = $this->getPropertyKey(); | $property_key = $this->getPropertyKey(); | ||||
| $xaction_type = AlmanacTransaction::TYPE_PROPERTY_UPDATE; | $xaction_type = $object->getAlmanacPropertySetTransactionType(); | ||||
| return array( | return array( | ||||
| id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
| ->setKey('value') | ->setKey('value') | ||||
| ->setMetadataValue('almanac.property', $property_key) | ->setMetadataValue('almanac.property', $property_key) | ||||
| ->setLabel($property_key) | ->setLabel($property_key) | ||||
| ->setTransactionType($xaction_type) | ->setTransactionType($xaction_type) | ||||
| ->setValue($object->getAlmanacPropertyValue($property_key)), | ->setValue($object->getAlmanacPropertyValue($property_key)), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||