Differential D16022 Diff 38574 src/applications/settings/panel/PhabricatorEditEngineSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorEditEngineSettingsPanel.php
| Show All 32 Lines | PhabricatorPolicyFilter::requireCapability( | ||||
| $preferences, | $preferences, | ||||
| PhabricatorPolicyCapability::CAN_EDIT); | PhabricatorPolicyCapability::CAN_EDIT); | ||||
| $engine->setTargetObject($preferences); | $engine->setTargetObject($preferences); | ||||
| return $engine->buildResponse(); | return $engine->buildResponse(); | ||||
| } | } | ||||
| final public function isEnabled() { | |||||
| // Only enable the panel if it has any fields. | |||||
| $field_keys = $this->getPanelSettingsKeys(); | |||||
| return (bool)$field_keys; | |||||
| } | |||||
| final public function newEditEnginePage() { | final public function newEditEnginePage() { | ||||
| $field_keys = $this->getPanelSettingsKeys(); | $field_keys = $this->getPanelSettingsKeys(); | ||||
| if (!$field_keys) { | if (!$field_keys) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| $key = $this->getPanelKey(); | $key = $this->getPanelKey(); | ||||
| $label = $this->getPanelName(); | $label = $this->getPanelName(); | ||||
| Show All 26 Lines | |||||