/**
  * 
  * @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 WidgetViewModel
  */
 protected function buildInternal(MenuWidget $menuWidget)
 {
     $rit = $menuWidget->getIterator();
     $viewModel = new WidgetViewModel();
     $viewModel->setTemplate('@BluegrassBluesWidget/kendo/kendo.html.twig');
     $viewModel->setBlockName('bluegrass_blues_menu_widget');
     $viewModel->set('items', $this->createViewModelForMenuItemIterator($rit));
     return $viewModel;
 }
 protected function buildInternal(GridWidgetInterface $widget)
 {
     $viewModel = new WidgetViewModel();
     $viewModel->setTemplate('@BluegrassBluesWidget/kendo/kendo.html.twig');
     $viewModel->setBlockName('bluegrass_blues_grid_widget');
     $viewModel->set('pageSize', $widget->getPageSize());
     $viewModel->set('count', $widget->count());
     /**
      * Configuro las columnas del ViewModel
      */
     $columns = array();
     foreach ($widget->getColumns() as $column) {
         $columns[] = $column->buildViewModel();
     }
     $viewModel->set('columns', $columns);
     /**
      * Configuro los items del ViewModel
      */
     $items = array();
     foreach ($widget as $itemModel) {
         $cells = array();
         foreach ($widget->getColumns() as $column) {
             $cells[$column->getName()] = $column->buildCellViewModel($itemModel);
         }
         $items[] = array('cells' => $cells);
     }
     $viewModel->set('rows', $items);
     return $viewModel;
 }
 protected function buildInternal(AjaxGridWidgetInterface $widget)
 {
     $viewModel = new WidgetViewModel();
     $viewModel->setTemplate('@BluegrassBluesWidget/kendo/kendo.html.twig');
     $viewModel->setBlockName('bluegrass_blues_ajaxgrid_widget');
     $viewModel->set('dataAjaxRequestUrl', $widget->getDataAjaxRequestRoute()->generateUrlWith($this->getUrlGenerator(), UrlGeneratorInterface::ABSOLUTE_PATH));
     $viewModel->set('pageSize', $widget->getPageSize());
     $viewModel->set('count', $widget->count());
     /**
      * Configuro las columnas del ViewModel
      */
     $columns = array();
     foreach ($widget->getColumns() as $column) {
         $columns[] = $column->buildViewModel();
     }
     $viewModel->set('columns', $columns);
     return $viewModel;
 }
 protected function buildInternal(GridWidget $widget)
 {
     $viewModel = new WidgetViewModel();
     $viewModel->setTemplate('@BluegrassBluesWidget/html.html.twig');
     $viewModel->setBlockName('bluegrass_blues_grid_widget');
     $viewModel->set('count', $widget->count());
     /**
      * Configuro las columnas del ViewModel
      */
     $columns = array();
     foreach ($widget->getColumns() as $column) {
         $columns[] = $this->buildColumnViewModel($widget, $column);
     }
     $viewModel->set('columns', $columns);
     /**
      * Configuro los items del ViewModel
      */
     $items = array();
     foreach ($widget as $itemModel) {
         $items[] = $this->buildItemViewModel($widget, $itemModel);
     }
     $viewModel->set('rows', $items);
     return $viewModel;
 }