예제 #1
0
 /**
  * @param array  $actions
  * @param Column $column
  * @param array  $options
  *
  * @return Collection
  */
 protected function getContent(array $actions, Column $column, array $options)
 {
     $collection = new Collection();
     foreach ($actions as $action) {
         $collection->add(new Link($this->getUrl($action), $this->getLabel($action['name'], $column->getGrid()->getName(), $options[ActionsExtension::NAME . '_trans'])));
     }
     return $collection;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function handle(Column $column, Entity $entity = null, array $options = array())
 {
     $subject = is_string($options[LabelExtension::NAME]) ? $options[LabelExtension::NAME] : $column->getName();
     return new Cell($this->getLabel($subject, $column->getGrid()->getName(), $options[LabelExtension::NAME . '_trans']));
 }