/** * (non-PHPdoc) * * @see \Widgets\WidgetBase::widget() */ public function widget($args, $instance) { /* * Put all languages available to show into the instance var. */ $instance['languages'] = I18n::getAllLangAvailableKeyValue(); /* * And call the widget func from the parent class WidgetBase. */ parent::widget($args, $instance); }
/** * Response the menu * * @param array $_datas * @return array JSON */ private function jsonMenu($_datas) { $type = $_datas['type']; $args = ['archives' => Archive::getMonthly(), 'categories' => Term::getCategories(), 'languages' => I18n::getAllLangAvailableKeyValue(), 'pages' => Post::getPages(), 'tags' => Term::getTags()]; $type = str_replace('-', '_', $type); $content = $this->render('menu/' . $type . '_default', $args); $json['content'] = $content; $json['code'] = KeysRequest::OK; return $json; }