Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 public function addColumn($property, $cell, array $options = array(), $sortable = true)
 {
     if (!$cell instanceof CellTypeInterface) {
         $cell = $this->container->get('opifer.crud.cell_registry')->getCellType($cell);
     }
     $column = new Column();
     $column->setProperty($property);
     $column->setCellType($cell);
     $column->setAttributes($options);
     $column->setSortable($sortable);
     if (isset($options['label'])) {
         $column->setLabel($options['label']);
     }
     $this->mapper->addColumn($column);
     return $this;
 }