Beispiel #1
0
 public function __invoke(DashboardModel $dashboard)
 {
     foreach ($dashboard->getRows() as $element) {
         $rows .= $this->getView()->row_helper($element);
     }
     $html = '<!-- Content Header (Page header) -->
 <section class="content-header">
   <h1>
     ' . $dashboard->getName() . '
     <small>Version 2.0</small>
   </h1>
   <ol class="breadcrumb">
     <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
     <li class="active">Dashboard</li>
   </ol>
 </section>
 <!-- Main content -->
 <section class="content">' . $rows . '</section>
 <!-- /.content -->';
     return $html;
 }
Beispiel #2
0
 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;
 }