| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 1 | public function _handler_metadata(Request $request, string $guid) |
|
| 25 | { |
||
| 26 | 1 | $this->object = midcom::get()->dbfactory->get_object_by_guid($guid); |
|
| 27 | 1 | $this->object->require_do('midgard:update'); |
|
| 28 | |||
| 29 | 1 | if ($this->object instanceof midcom_db_topic) { |
|
| 30 | 1 | $this->object->require_do('midcom.admin.folder:topic_management'); |
|
| 31 | } |
||
| 32 | |||
| 33 | 1 | $object_label = midcom_helper_reflector::get($this->object)->get_object_label($this->object); |
|
| 34 | 1 | midcom::get()->head->set_pagetitle(sprintf($this->_l10n->get('edit metadata of %s'), $object_label)); |
|
| 35 | |||
| 36 | 1 | $workflow = $this->get_workflow('datamanager', [ |
|
| 37 | 1 | 'controller' => $this->object->metadata->get_datamanager()->get_controller() |
|
| 38 | 1 | ]); |
|
| 39 | 1 | return $workflow->run($request); |
|
| 40 | } |
||
| 42 |