1 | <?php |
||
16 | class DetailController implements ContainerInjectionInterface { |
||
17 | |||
18 | /** |
||
19 | * The mongodb.watchdog_event_controller service. |
||
20 | * |
||
21 | * @var \Drupal\mongodb_watchdog\EventController |
||
22 | */ |
||
23 | protected $eventController; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param \Psr\Log\LoggerInterface $logger |
||
29 | * The logger service, to log intervening events. |
||
30 | * @param \Drupal\mongodb_watchdog\EventController $event_controller |
||
31 | * The event controller service. |
||
32 | * @param \Drupal\Core\Config\ImmutableConfig $config |
||
33 | * The module configuration. |
||
34 | */ |
||
35 | public function __construct(LoggerInterface $logger, EventController $event_controller, ImmutableConfig $config) { |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public static function create(ContainerInterface $container) { |
||
56 | |||
57 | /** |
||
58 | * Controller for mongodb_watchdog.detail. |
||
59 | * |
||
60 | * @param \Drupal\mongodb_watchdog\EventTemplate $event_template |
||
61 | * The event template. |
||
62 | * |
||
63 | * @return array |
||
64 | * A render array. |
||
65 | */ |
||
66 | public function detail(EventTemplate $event_template) { |
||
108 | |||
109 | /** |
||
110 | * Report on the extra event occurrences. |
||
111 | * |
||
112 | * @param \Drupal\mongodb_watchdog\EventTemplate $event_template |
||
113 | * The event template. |
||
114 | * @param array $event_rows |
||
115 | * The event rows array. |
||
116 | * |
||
117 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup|null |
||
118 | * A message about the remaining events not displayed on the page, or NULL |
||
119 | * if there are no additional messages. |
||
120 | * |
||
121 | * @XXX Maybe replace by a pager later ? |
||
122 | */ |
||
123 | protected function detailFooter(EventTemplate $event_template, array $event_rows) { |
||
136 | |||
137 | /** |
||
138 | * Build the heading rows on the event occurrences page. |
||
139 | * |
||
140 | * @param \Drupal\mongodb_watchdog\EventTemplate $template |
||
141 | * The event template. |
||
142 | * |
||
143 | * @return array |
||
144 | * A table render array. |
||
145 | */ |
||
146 | protected function detailHeader(EventTemplate $template) { |
||
160 | |||
161 | /** |
||
162 | * Build the occurrence rows on the event occurrences page. |
||
163 | * |
||
164 | * @param \Drupal\mongodb_watchdog\EventTemplate $template |
||
165 | * The event template. |
||
166 | * |
||
167 | * @return array |
||
168 | * A table render array. |
||
169 | */ |
||
170 | protected function detailRows(EventTemplate $template) { |
||
180 | |||
181 | /** |
||
182 | * Title callback for mongodb_watchdog.detail. |
||
183 | * |
||
184 | * @param \Drupal\mongodb_watchdog\EventTemplate $event_template |
||
185 | * The event template for which the title is built. |
||
186 | * |
||
187 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup |
||
188 | * The page title. |
||
189 | */ |
||
190 | public function detailTitle(EventTemplate $event_template) { |
||
193 | |||
194 | } |
||
195 |