function __toString() { $this->init(); try { $sections = []; $current_access_name = null; if (is_array($this->maps) && count($this->maps)) { foreach ($this->maps as $section => $map) { $sections[$section] = $map->getItems(); $c = $map->getCurrent(); if ($c) { $current_access_name = $c; } } } $this->values['sections'] = $sections; $this->values['current_access_name'] = $current_access_name; return parent::__toString(); } catch (\Exception $e) { return $e->getMessage(); } }
function __toString() { $this->values['items'] = $this->map->getItems(); $this->values['current_access_name'] = $this->map->getCurrent(); return parent::__toString(); }