Exemple #1
0
 public final function setColumn(ColumnInterface $column) : TableInterface
 {
     if ($this->isImmutable()) {
         throw SchemaException::immutable(static::class);
     }
     if ($this->hasColumn($column->getName())) {
         throw SchemaException::columnAlreadySet(static::class, $column->getName());
     }
     $this->columns[$column->getName()] = $column;
     return $this;
 }
 /**
  * Adds new DataGrid column to collection
  *
  * @param ColumnInterface $column
  */
 public function add(ColumnInterface $column)
 {
     $this->columns[$column->getId()] = $column;
 }