Differential D14702 Diff 35572 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_DEFAULTCREATE = 'editengine.config.default.create'; | ||||
| const TYPE_ISEDIT = 'editengine.config.isedit'; | |||||
| const TYPE_DISABLE = 'editengine.config.disable'; | 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 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| return pht( | return pht( | ||||
| '%s added this form to the "Create" menu.', | '%s added this form to the "Create" menu.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s removed this form from the "Create" menu.', | '%s removed this form from the "Create" menu.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } | } | ||||
| case self::TYPE_ISEDIT: | |||||
| if ($new) { | |||||
| return pht( | |||||
| '%s marked this form as an edit form.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } else { | |||||
| return pht( | |||||
| '%s unmarked this form as an edit form.', | |||||
| $this->renderHandleLink($author_phid)); | |||||
| } | |||||
| case self::TYPE_DISABLE: | case self::TYPE_DISABLE: | ||||
| if ($new) { | if ($new) { | ||||
| return pht( | return pht( | ||||
| '%s disabled this form.', | '%s disabled this form.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s enabled this form.', | '%s enabled this form.', | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } | } | ||||
| } | } | ||||
| return parent::getTitle(); | return parent::getTitle(); | ||||
| } | } | ||||
| } | } | ||||