Differential D20417 Diff 48761 src/applications/project/trigger/PhabricatorProjectTriggerPlaySoundRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/trigger/PhabricatorProjectTriggerPlaySoundRule.php
| <?php | <?php | ||||
| final class PhabricatorProjectTriggerPlaySoundRule | final class PhabricatorProjectTriggerPlaySoundRule | ||||
| extends PhabricatorProjectTriggerRule { | extends PhabricatorProjectTriggerRule { | ||||
| const TRIGGERTYPE = 'sound'; | const TRIGGERTYPE = 'sound'; | ||||
| public function getSelectControlName() { | public function getSelectControlName() { | ||||
| return pht('Play sound'); | return pht('Play sound'); | ||||
| } | } | ||||
| protected function assertValidRuleValue($value) { | protected function assertValidRuleRecordFormat($value) { | ||||
| if (!is_string($value)) { | if (!is_string($value)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Status rule value should be a string, but is not (value is "%s").', | 'Status rule value should be a string, but is not (value is "%s").', | ||||
| phutil_describe_type($value))); | phutil_describe_type($value))); | ||||
| } | } | ||||
| } | |||||
| protected function assertValidRuleRecordValue($value) { | |||||
| $map = self::getSoundMap(); | $map = self::getSoundMap(); | ||||
| if (!isset($map[$value])) { | if (!isset($map[$value])) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Rule value ("%s") is not a valid sound.', | 'Sound ("%s") is not a valid sound.', | ||||
| $value)); | $value)); | ||||
| } | } | ||||
| } | } | ||||
| protected function newDropTransactions($object, $value) { | protected function newDropTransactions($object, $value) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines | |||||