/**
  * 
  * @return WidgetViewModel
  */
 public function buildInternal(FilterableMenuWidget $filterableMenuWidget)
 {
     $viewModel = new WidgetViewModel();
     $viewModel->setTemplate('@BluegrassBluesWidget/kendo/kendo.html.twig');
     $viewModel->setBlockName('bluegrass_blues_filterablemenu_widget');
     $viewModel->set('menuWidget', $filterableMenuWidget->getMenuWidget()->buildViewModel());
     return $viewModel;
 }
 /**
  * 
  * @return FilterableMenuWidget
  * @throws \Exception
  */
 public function build()
 {
     if (is_null($this->getModel())) {
         throw new \Exception("El FilterableMenuWidgetBuilder necesita que se le especifique un FilterableMenuWidgetModel para poder construir un FilterableMenuWidget");
     }
     $menuWidget = $this->getMenuWidgetBuilder()->withModel(new MenuWidgetModel($this->getModel()->getIterator()))->build();
     $filterableMenuWidget = new FilterableMenuWidget($this->getModel(), $this->getViewModelBuilder());
     $filterableMenuWidget->setMenuWidget($menuWidget);
     return $filterableMenuWidget;
 }