Differential D14584 Diff 35308 src/applications/transactions/storage/PhabricatorEditEngineConfigurationTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/storage/PhabricatorEditEngineConfigurationTransaction.php
| <?php | <?php | ||||
| final class PhabricatorEditEngineConfigurationTransaction | final class PhabricatorEditEngineConfigurationTransaction | ||||
| extends PhabricatorApplicationTransaction { | extends PhabricatorApplicationTransaction { | ||||
| const TYPE_NAME = 'editengine.config.name'; | const TYPE_NAME = 'editengine.config.name'; | ||||
| const TYPE_PREAMBLE = 'editengine.config.preamble'; | const TYPE_PREAMBLE = 'editengine.config.preamble'; | ||||
| const TYPE_ORDER = 'editengine.config.order'; | const TYPE_ORDER = 'editengine.config.order'; | ||||
| const TYPE_DEFAULT = 'editengine.config.default'; | const TYPE_DEFAULT = 'editengine.config.default'; | ||||
| const TYPE_LOCKS = 'editengine.config.locks'; | const TYPE_LOCKS = 'editengine.config.locks'; | ||||
| const TYPE_DEFAULTCREATE = 'editengine.config.default.create'; | |||||
| const TYPE_DISABLE = 'editengine.config.disable'; | |||||
| public function getApplicationName() { | public function getApplicationName() { | ||||
| return 'search'; | return 'search'; | ||||
| } | } | ||||
| public function getApplicationTransactionType() { | public function getApplicationTransactionType() { | ||||
| return PhabricatorEditEngineConfigurationPHIDType::TYPECONST; | return PhabricatorEditEngineConfigurationPHIDType::TYPECONST; | ||||
| } | } | ||||
| Show All 36 Lines | switch ($type) { | ||||
| return pht( | return pht( | ||||
| '%s changed the default value for field "%s".', | '%s changed the default value for field "%s".', | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $key); | $key); | ||||
| case self::TYPE_LOCKS: | case self::TYPE_LOCKS: | ||||
| return pht( | return pht( | ||||
| '%s changed locked and hidden fields.', | '%s changed locked and hidden fields.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| case self::TYPE_DEFAULTCREATE: | |||||
| if ($new) { | |||||
| return pht( | |||||
| '%s added this form to the "Create" menu.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } else { | |||||
| return pht( | |||||
| '%s removed this form from the "Create" menu.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } | |||||
| case self::TYPE_DISABLE: | |||||
| if ($new) { | |||||
| return pht( | |||||
| '%s disabled this form.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } else { | |||||
| return pht( | |||||
| '%s enabled this form.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } | |||||
| } | } | ||||
| return parent::getTitle(); | return parent::getTitle(); | ||||
| } | } | ||||
| } | } | ||||