Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/adapter/HeraldAdapter.php
| Show First 20 Lines • Show All 870 Lines • ▼ Show 20 Lines | foreach ($adapters as $adapter) { | ||||
| $type = $adapter->getAdapterContentType(); | $type = $adapter->getAdapterContentType(); | ||||
| $name = $adapter->getAdapterContentName(); | $name = $adapter->getAdapterContentName(); | ||||
| $map[$type] = $name; | $map[$type] = $name; | ||||
| } | } | ||||
| return $map; | return $map; | ||||
| } | } | ||||
| public static function isAdapterEnabled(PhabricatorUser $viewer, | |||||
artms: I think this is equivalent to `getEnabledAdapterMap(PhabricatorUser $viewer)` but without… | |||||
| HeraldAdapter $adapter) { | |||||
| return $adapter->isAvailableToUser($viewer); | |||||
| } | |||||
| public function getEditorValueForCondition( | public function getEditorValueForCondition( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| HeraldCondition $condition) { | HeraldCondition $condition) { | ||||
| $field = $this->requireFieldImplementation($condition->getFieldName()); | $field = $this->requireFieldImplementation($condition->getFieldName()); | ||||
| return $field->getEditorValue( | return $field->getEditorValue( | ||||
| $viewer, | $viewer, | ||||
| ▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines | |||||
I think this is equivalent to getEnabledAdapterMap(PhabricatorUser $viewer) but without querying all adapters, hope so...