| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class midcom_admin_rcs_handler_rcs extends midcom_services_rcs_handler |
||
| 14 | { |
||
| 15 | protected $style_prefix = 'midcom-admin-rcs-'; |
||
| 16 | |||
| 17 | protected $url_prefix = '__ais/rcs/'; |
||
| 18 | |||
| 19 | 3 | protected function get_breadcrumbs() : array |
|
| 20 | { |
||
| 21 | 3 | $items = []; |
|
| 22 | 3 | if (!is_a($this->object, midcom_db_topic::class)) { |
|
| 23 | 3 | $items[] = [ |
|
| 24 | 3 | MIDCOM_NAV_URL => $this->get_object_url(), |
|
| 25 | 3 | MIDCOM_NAV_NAME => $this->resolve_object_title() |
|
| 26 | ]; |
||
| 27 | } |
||
| 28 | 3 | return $items; |
|
| 29 | } |
||
| 30 | |||
| 31 | 3 | protected function reply(string $element) : Response |
|
| 32 | { |
||
| 33 | 3 | $this->_view_toolbar->add_item([ |
|
| 34 | 3 | MIDCOM_TOOLBAR_URL => $this->get_object_url(), |
|
| 35 | 3 | MIDCOM_TOOLBAR_LABEL => sprintf($this->_l10n->get('back to %s'), $this->resolve_object_title()), |
|
| 36 | 3 | MIDCOM_TOOLBAR_GLYPHICON => 'eject', |
|
| 37 | ]); |
||
| 38 | 3 | return $this->show($element); |
|
| 39 | } |
||
| 40 | |||
| 41 | 3 | protected function get_object_url() : string |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Load the statics & prepend styledir |
||
| 48 | */ |
||
| 49 | 3 | public function _on_initialize() |
|
| 54 |