Example #1
0
 protected function grid($entities)
 {
     $grid = array();
     foreach ($entities as $item) {
         $grid[] = array('<input type="checkbox" name="ids[]" class="check" value="' . $item->getId() . '"/>', Html::showImage($this->container, $item->getImage()), '<a href="' . $this->generateUrl('content_banner_new', array('id' => $item->getId())) . '">' . $item->getName() . '</a>', $item->getPosition(), is_object($item->getCreated()) ? $item->getCreated()->format('d/m/Y') : '', Html::showStatusInTable($this->container, $item->getEnabled()), Html::showActionButtonsInTable($this->container, array('edit' => $this->generateUrl('content_banner_new', array('id' => $item->getId())))));
     }
     return $grid;
 }