From d678c12ac8d52c3324802ce8b066de8f42beda15 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 2 Jan 2012 16:58:46 +0100 Subject: [PATCH] API CHANGE Removed FormAction->extraData() and $extraData constructor argument, use setAttribute() instead --- forms/FormAction.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/forms/FormAction.php b/forms/FormAction.php index 4bf17538f..0f72f22b4 100644 --- a/forms/FormAction.php +++ b/forms/FormAction.php @@ -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,