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 $extraData;
protected $action;
/**
@ -49,17 +47,14 @@ class FormAction extends FormField {
* @param action The method to call when the button is clicked
* @param title The label on the button
* @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) {
$this->extraData = $extraData;
function __construct($action, $title = "", $form = null) {
$this->action = "action_$action";
parent::__construct($this->action, $title, null, $form);
}
static function create($action, $title = "", $extraData = null) {
return new FormAction($action, $title, null, $extraData);
static function create($action, $title = "") {
return new FormAction($action, $title);
}
function actionName() {
@ -74,10 +69,6 @@ class FormAction extends FormField {
$this->action = $fullAction;
}
function extraData() {
return $this->extraData;
}
function Field($properties = array()) {
$properties = array_merge(
$properties,