API CHANGE Removed FormAction->extraData() and $extraData constructor argument, use setAttribute() instead

This commit is contained in:
Ingo Schommer 2012-01-02 16:58:46 +01:00
parent eb5716f471
commit d678c12ac8

View File

@ -22,8 +22,6 @@ class FormAction extends FormField {
protected $template = 'FormAction'; protected $template = 'FormAction';
protected $extraData;
protected $action; protected $action;
/** /**
@ -49,17 +47,14 @@ class FormAction extends FormField {
* @param action The method to call when the button is clicked * @param action The method to call when the button is clicked
* @param title The label on the button * @param title The label on the button
* @param form The parent form, auto-set when the field is placed inside a form * @param form The parent form, auto-set when the field is placed inside a form
* @param extraData A piece of extra data that can be extracted with $this->extraData. Useful for
* calling $form->buttonClicked()->extraData()
*/ */
function __construct($action, $title = "", $form = null, $extraData = null) { function __construct($action, $title = "", $form = null) {
$this->extraData = $extraData;
$this->action = "action_$action"; $this->action = "action_$action";
parent::__construct($this->action, $title, null, $form); parent::__construct($this->action, $title, null, $form);
} }
static function create($action, $title = "", $extraData = null) { static function create($action, $title = "") {
return new FormAction($action, $title, null, $extraData); return new FormAction($action, $title);
} }
function actionName() { function actionName() {
@ -74,10 +69,6 @@ class FormAction extends FormField {
$this->action = $fullAction; $this->action = $fullAction;
} }
function extraData() {
return $this->extraData;
}
function Field($properties = array()) { function Field($properties = array()) {
$properties = array_merge( $properties = array_merge(
$properties, $properties,