Mercurial > hg > isophonics-drupal-site
comparison core/modules/dblog/src/Controller/DbLogController.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
111 * | 111 * |
112 * Messages are truncated at 56 chars. | 112 * Messages are truncated at 56 chars. |
113 * Full-length messages can be viewed on the message details page. | 113 * Full-length messages can be viewed on the message details page. |
114 * | 114 * |
115 * @return array | 115 * @return array |
116 * A render array as expected by drupal_render(). | 116 * A render array as expected by |
117 * \Drupal\Core\Render\RendererInterface::render(). | |
117 * | 118 * |
118 * @see Drupal\dblog\Form\DblogClearLogConfirmForm | 119 * @see Drupal\dblog\Form\DblogClearLogConfirmForm |
119 * @see Drupal\dblog\Controller\DbLogController::eventDetails() | 120 * @see Drupal\dblog\Controller\DbLogController::eventDetails() |
120 */ | 121 */ |
121 public function overview() { | 122 public function overview() { |
235 * @param int $event_id | 236 * @param int $event_id |
236 * Unique ID of the database log message. | 237 * Unique ID of the database log message. |
237 * | 238 * |
238 * @return array | 239 * @return array |
239 * If the ID is located in the Database Logging table, a build array in the | 240 * If the ID is located in the Database Logging table, a build array in the |
240 * format expected by drupal_render(); | 241 * format expected by \Drupal\Core\Render\RendererInterface::render(). |
241 */ | 242 */ |
242 public function eventDetails($event_id) { | 243 public function eventDetails($event_id) { |
243 $build = []; | 244 $build = []; |
244 if ($dblog = $this->database->query('SELECT w.*, u.uid FROM {watchdog} w LEFT JOIN {users} u ON u.uid = w.uid WHERE w.wid = :id', [':id' => $event_id])->fetchObject()) { | 245 if ($dblog = $this->database->query('SELECT w.*, u.uid FROM {watchdog} w LEFT JOIN {users} u ON u.uid = w.uid WHERE w.wid = :id', [':id' => $event_id])->fetchObject()) { |
245 $severity = RfcLogLevel::getLevels(); | 246 $severity = RfcLogLevel::getLevels(); |
376 * | 377 * |
377 * @param string $type | 378 * @param string $type |
378 * Type of database log events to display (e.g., 'search'). | 379 * Type of database log events to display (e.g., 'search'). |
379 * | 380 * |
380 * @return array | 381 * @return array |
381 * A build array in the format expected by drupal_render(). | 382 * A build array in the format expected by |
383 * \Drupal\Core\Render\RendererInterface::render(). | |
382 */ | 384 */ |
383 public function topLogMessages($type) { | 385 public function topLogMessages($type) { |
384 $header = [ | 386 $header = [ |
385 ['data' => $this->t('Count'), 'field' => 'count', 'sort' => 'desc'], | 387 ['data' => $this->t('Count'), 'field' => 'count', 'sort' => 'desc'], |
386 ['data' => $this->t('Message'), 'field' => 'message'], | 388 ['data' => $this->t('Message'), 'field' => 'message'], |