/** * Get menu configuration. * * @return Config */ public function config() { if ($this->config) { return $this->config; } $config = parent::config(); $menu = $this->getWPMenu($this->params); $config->set('settings.title', $menu->name); return $config; }
public function init(&$params) { parent::init($params); if (!empty($params['admin'])) { /** @var \JTableMenuType $table */ $menuType = \JTable::getInstance('MenuType'); $menuType->load(['menutype' => $params['menu']]); $config = $this->config(); $config->set('settings.title', $menuType->title); $config->set('settings.description', $menuType->description); } }