Differential D14831 Diff 35886 src/applications/system/engine/PhabricatorDestructionEngineExtensionModule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/system/engine/PhabricatorDestructionEngineExtensionModule.php
- This file was copied from src/applications/transactions/editengineextension/PhabricatorEditEngineExtensionModule.php.
| <?php | <?php | ||||
| final class PhabricatorEditEngineExtensionModule | final class PhabricatorDestructionEngineExtensionModule | ||||
| extends PhabricatorConfigModule { | extends PhabricatorConfigModule { | ||||
| public function getModuleKey() { | public function getModuleKey() { | ||||
| return 'editengine'; | return 'destructionengine'; | ||||
| } | } | ||||
| public function getModuleName() { | public function getModuleName() { | ||||
| return pht('EditEngine Extensions'); | return pht('Engine: Destruction'); | ||||
| } | } | ||||
| public function renderModuleStatus(AphrontRequest $request) { | public function renderModuleStatus(AphrontRequest $request) { | ||||
| $viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
| $extensions = PhabricatorEditEngineExtension::getAllExtensions(); | $extensions = PhabricatorDestructionEngineExtension::getAllExtensions(); | ||||
| $rows = array(); | $rows = array(); | ||||
| foreach ($extensions as $extension) { | foreach ($extensions as $extension) { | ||||
| $rows[] = array( | $rows[] = array( | ||||
| $extension->getExtensionPriority(), | |||||
| get_class($extension), | get_class($extension), | ||||
| $extension->getExtensionName(), | $extension->getExtensionName(), | ||||
| $extension->isExtensionEnabled() | |||||
| ? pht('Yes') | |||||
| : pht('No'), | |||||
| ); | ); | ||||
| } | } | ||||
| $table = id(new AphrontTableView($rows)) | $table = id(new AphrontTableView($rows)) | ||||
| ->setHeaders( | ->setHeaders( | ||||
| array( | array( | ||||
| pht('Priority'), | |||||
| pht('Class'), | pht('Class'), | ||||
| pht('Name'), | pht('Name'), | ||||
| pht('Enabled'), | |||||
| )) | )) | ||||
| ->setColumnClasses( | ->setColumnClasses( | ||||
| array( | array( | ||||
| null, | null, | ||||
| null, | |||||
| 'wide pri', | 'wide pri', | ||||
| null, | |||||
| )); | )); | ||||
| return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
| ->setHeaderText(pht('EditEngine Extensions')) | ->setHeaderText(pht('DestructionEngine Extensions')) | ||||
| ->setTable($table); | ->setTable($table); | ||||
| } | } | ||||
| } | } | ||||