public function __invoke(RowModel $dashboard) { foreach ($dashboard->getCols() as $element) { $cols .= $this->getView()->col_helper($element); } $html = '<!-- Content Row --> <div class="row">' . $cols . '</div> <!-- /.row -->'; return $html; }
public function viewAction() { $page = $this->confPage(); $page->setActivePage(1); $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default'); //Page2 $request = $this->getRequest(); if ($request->isPost()) { $post = $request->getPost(); } $widgetView = new WidgetView($em, $this->params()->fromRoute('id', 1), 'addr_view', $this->params()->fromQuery('addr_view_mode', 'view'), new DekaAddresses(), 'Inventory\\Entity\\DekaAddresses'); $widgetView->setPost($post); $col2 = new Col(); $col2->addWidget($widgetView); $row2 = new Row(); $row2->addCol($col2); $dashboard2 = new Dashboard(); $dashboard2->setId("2"); $dashboard2->setName("Параметры"); $dashboard2->setUrl("view"); $dashboard2->addRow($row2); $page->setDashboard($dashboard2); $view = new ViewModel(array('dashboard' => $page)); $view->setTemplate('inventory/addr/index'); return $view; }