Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editengine/PhabricatorEditEngine.php
| Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | if ($object instanceof PhabricatorSubscribableInterface) { | ||||
| ->setDescription(pht('Manage subscribers.')) | ->setDescription(pht('Manage subscribers.')) | ||||
| ->setAliases(array('subscriber', 'subscribers')) | ->setAliases(array('subscriber', 'subscribers')) | ||||
| ->setTransactionType($subscribers_type) | ->setTransactionType($subscribers_type) | ||||
| ->setValue($sub_phids); | ->setValue($sub_phids); | ||||
| $fields[] = $subscribers_field; | $fields[] = $subscribers_field; | ||||
| } | } | ||||
| } | } | ||||
| $xaction = $object->getApplicationTransactionTemplate(); | |||||
| $comment = $xaction->getApplicationTransactionCommentObject(); | |||||
| if ($comment) { | |||||
| $comment_type = PhabricatorTransactions::TYPE_COMMENT; | |||||
| $comment_field = id(new PhabricatorCommentEditField()) | |||||
| ->setKey('comment') | |||||
| ->setLabel(pht('Comments')) | |||||
| ->setDescription(pht('Add comments.')) | |||||
| ->setAliases(array('comments')) | |||||
| ->setIsHidden(true) | |||||
| ->setTransactionType($comment_type) | |||||
| ->setValue(null); | |||||
| $fields[] = $comment_field; | |||||
| } | |||||
| $config = $this->getEditEngineConfiguration(); | $config = $this->getEditEngineConfiguration(); | ||||
| $fields = $config->applyConfigurationToFields($this, $fields); | $fields = $config->applyConfigurationToFields($this, $fields); | ||||
| foreach ($fields as $field) { | foreach ($fields as $field) { | ||||
| $field | $field | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->setObject($object); | ->setObject($object); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 834 Lines • Show Last 20 Lines | |||||