Path: blob/master/src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php
12256 views
<?php12final class PhabricatorCalendarEventHeraldAdapter extends HeraldAdapter {34private $object;56public function getAdapterApplicationClass() {7return 'PhabricatorCalendarApplication';8}910public function getAdapterContentDescription() {11return pht('React to events being created or updated.');12}1314protected function newObject() {15return new PhabricatorCalendarEvent();16}1718public function isTestAdapterForObject($object) {19return ($object instanceof PhabricatorCalendarEvent);20}2122public function getAdapterTestDescription() {23return pht(24'Test rules which run when an event is created or updated.');25}2627public function setObject($object) {28$this->object = $object;29return $this;30}3132public function getObject() {33return $this->object;34}3536public function getAdapterContentName() {37return pht('Calendar Events');38}3940public function supportsRuleType($rule_type) {41switch ($rule_type) {42case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:43case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:44return true;45case HeraldRuleTypeConfig::RULE_TYPE_OBJECT:46default:47return false;48}49}5051public function getHeraldName() {52return $this->getObject()->getMonogram();53}5455}565758