addColumn() public method

Call this if you are adding this inside a grid.
public addColumn ( string $name, string $title = null, array | string $buttontext = null, Grid $grid = null )
$name string Field Name (must not contain spaces)
$title string Header for the column
$buttontext array | string Text to put on the button
$grid Grid Specify grid to use, other than $owner
Beispiel #1
0
 /**
  * Configures necessary components when CRUD is in the editing mode.
  *
  * @param array $fields List of fields for add form
  *
  * @return void|Model If model, then bail out, no greed needed
  */
 protected function configureEdit($fields = null)
 {
     // We are actually in the frame!
     if ($this->isEditing('edit')) {
         $m = $this->form->setModel($this->model, $fields);
         $m->load($this->id);
         $this->form->addSubmit();
         $this->form->onSubmit(array($this, 'formSubmit'));
         return $m;
     } elseif ($this->isEditing()) {
         return;
     }
     $this->virtual_page->addColumn('edit', 'Editing ' . $this->entity_name, array('descr' => 'Edit', 'icon' => 'pencil'), $this->grid);
 }