/** * Checkbox column constructor. * @param string column's textual caption * @param string destination or signal to handler which do the move rutine * @param array textual labels for generated links * @param bool use ajax? (add class self::$ajaxClass into generated link) * @return void */ public function __construct($caption = NULL, $destination = NULL, array $moves = NULL, $useAjax = TRUE) { parent::__construct($caption, 0); $this->useAjax = $useAjax; if (empty($moves)) { $this->moves['up'] = 'Move up'; $this->moves['down'] = 'Move down'; } else { $this->moves = $moves; } // try set handler if is not set if ($destination === NULL) { $this->destination = $this->getName . 'Move!'; } else { $this->destination = $destination; } $this->monitor('DataGrid'); }
/** * Checkbox column constructor * * @param string $caption column's textual caption */ public function __construct($caption = NULL) { parent::__construct($caption, 0); $this->getCellPrototype()->style('text-align: center'); }