Esempio n. 1
0
 /**
  * Add column
  * @param string name
  * @param string label
  * @param array options
  * @return Column
  */
 public function addColumn($name, $label = null, array $options = array())
 {
     $column = new Column($this["columns"], $name);
     $column->setLabel($label);
     $this->setOptions($column, $options);
     return $column;
 }
Esempio n. 2
0
 /**
  * Add column
  * @param string $name
  * @param string $label
  * @param callback $renderer
  * @return Column
  */
 public function addColumn($name, $label, $renderer = null)
 {
     $column = new Column($this["columns"], $name);
     $column->setLabel($label);
     if ($renderer) {
         $column->setCellRenderer($renderer);
     }
     return $column;
 }
Esempio n. 3
0
 /**
  * Add column
  * @param string name
  * @param string label
  * @param array options
  * @return Column
  */
 public function addColumn($name, $label = null, array $options = array())
 {
     $componentName = \Nette\Utils\Strings::webalize($name);
     $componentName = strtr($componentName, '-', '_');
     $column = new Column($this['columns'], $componentName);
     $column->setColumnName($name);
     $column->setLabel($label);
     $this->setOptions($column, $options);
     return $column;
 }