Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/trigger/PhabricatorProjectTriggerRule.php
| Show All 31 Lines | abstract class PhabricatorProjectTriggerRule | ||||
| final public function getRecord() { | final public function getRecord() { | ||||
| return $this->record; | return $this->record; | ||||
| } | } | ||||
| final protected function getValue() { | final protected function getValue() { | ||||
| return $this->getRecord()->getValue(); | return $this->getRecord()->getValue(); | ||||
| } | } | ||||
| abstract public function getDescription(); | |||||
| abstract public function getSelectControlName(); | abstract public function getSelectControlName(); | ||||
| abstract public function getRuleViewLabel(); | abstract public function getRuleViewLabel(); | ||||
| abstract public function getRuleViewDescription($value); | abstract public function getRuleViewDescription($value); | ||||
| abstract public function getRuleViewIcon($value); | abstract public function getRuleViewIcon($value); | ||||
| abstract protected function assertValidRuleValue($value); | abstract protected function assertValidRuleValue($value); | ||||
| abstract protected function newDropTransactions($object, $value); | abstract protected function newDropTransactions($object, $value); | ||||
| abstract protected function newDropEffects($value); | abstract protected function newDropEffects($value); | ||||
| abstract protected function getDefaultValue(); | abstract protected function getDefaultValue(); | ||||
| ▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | final protected function newTransaction() { | ||||
| return $this->getObject()->getApplicationTransactionTemplate(); | return $this->getObject()->getApplicationTransactionTemplate(); | ||||
| } | } | ||||
| final public function getDropEffects() { | final public function getDropEffects() { | ||||
| return $this->newDropEffects($this->getValue()); | return $this->newDropEffects($this->getValue()); | ||||
| } | } | ||||
| final protected function newEffect() { | final protected function newEffect() { | ||||
| return new PhabricatorProjectDropEffect(); | return id(new PhabricatorProjectDropEffect()) | ||||
| ->setIsTriggerEffect(true); | |||||
| } | } | ||||
| final public function toDictionary() { | final public function toDictionary() { | ||||
| $record = $this->getRecord(); | $record = $this->getRecord(); | ||||
| $is_valid = $this->isValidRule(); | $is_valid = $this->isValidRule(); | ||||
| if (!$is_valid) { | if (!$is_valid) { | ||||
| $invalid_view = hsprintf('%s', $this->newInvalidView()); | $invalid_view = hsprintf('%s', $this->newInvalidView()); | ||||
| Show All 27 Lines | |||||