Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/console/plugin/DarkConsoleEventPlugin.php
| <?php | <?php | ||||
| /** | |||||
| * @group console | |||||
| */ | |||||
| final class DarkConsoleEventPlugin extends DarkConsolePlugin { | final class DarkConsoleEventPlugin extends DarkConsolePlugin { | ||||
| public function getName() { | public function getName() { | ||||
| return 'Events'; | return 'Events'; | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return 'Information about Phabricator events and event listeners.'; | return 'Information about Phabricator events and event listeners.'; | ||||
| } | } | ||||
| public function generateData() { | public function generateData() { | ||||
| $listeners = PhutilEventEngine::getInstance()->getAllListeners(); | $listeners = PhutilEventEngine::getInstance()->getAllListeners(); | ||||
| foreach ($listeners as $key => $listener) { | foreach ($listeners as $key => $listener) { | ||||
| $listeners[$key] = array( | $listeners[$key] = array( | ||||
| 'id' => $listener->getListenerID(), | 'id' => $listener->getListenerID(), | ||||
| 'class' => get_class($listener), | 'class' => get_class($listener), | ||||
| ); | ); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | $table->setHeaders( | ||||
| 'Stopped', | 'Stopped', | ||||
| )); | )); | ||||
| $out[] = $table->render(); | $out[] = $table->render(); | ||||
| return phutil_implode_html("\n", $out); | return phutil_implode_html("\n", $out); | ||||
| } | } | ||||
| } | } | ||||