From 4d176f4e64e162dee2cc8b600a1557d1b42acf1d Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 5 Jan 2012 13:27:19 +1300 Subject: [PATCH] MDL-30979 output: Fixed up phpdocs for output actions code --- lib/outputactions.php | 55 ++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/lib/outputactions.php b/lib/outputactions.php index cd5dad4efab..56309b3e6f4 100644 --- a/lib/outputactions.php +++ b/lib/outputactions.php @@ -1,5 +1,4 @@ event = $event; @@ -83,8 +82,23 @@ class component_action { /** * Confirm action + * + * @copyright 2009 Nicolas Connault + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @since Moodle 2.0 + * @package core + * @subpackage output */ class confirm_action extends component_action { + /** + * Constructs the confirm action object + * + * @param string $message The message to display to the user when they are shown + * the confirm dialogue. + * @param string $callback The method to call when the user confirms the action. + * @param string $continuelabel The string to use for he continue button + * @param string $cancellabel The string to use for the cancel button + */ public function __construct($message, $callback = null, $continuelabel = null, $cancellabel = null) { parent::__construct('click', 'M.util.show_confirm_dialog', array( 'message' => $message, 'callback' => $callback, @@ -97,15 +111,22 @@ class confirm_action extends component_action { * Component action for a popup window. * * @copyright 2009 Nicolas Connault - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @since Moodle 2.0 + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @since Moodle 2.0 + * @package core + * @subpackage output */ class popup_action extends component_action { + /** + * The JS function to call for the popup + * @var string + */ public $jsfunction = 'openpopup'; /** - * @var array $params An array of parameters that will be passed to the openpopup JS function + * An array of parameters that will be passed to the openpopup JS function + * @var array $params */ public $params = array( 'height' => 400, @@ -124,11 +145,11 @@ class popup_action extends component_action { /** * Constructor + * * @param string $event DOM event * @param moodle_url|string $url A moodle_url object, required if no jsfunction is given - * @param string $method 'post' or 'get' + * @param string $name The JS function to call for the popup (default 'popup') * @param array $params An array of popup parameters - * @return void */ public function __construct($event, $url, $name='popup', $params=array()) { global $CFG;