From 67cf0a912c8ed24c7466163fa409e8154082e1df Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 13 Apr 2014 23:24:10 +0200 Subject: [ticket/10073] Add doc blocks to new classes PHPBB3-10073 --- phpBB/phpbb/message/topic_form.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/message/topic_form.php') diff --git a/phpBB/phpbb/message/topic_form.php b/phpBB/phpbb/message/topic_form.php index 5a5d090017..988028c301 100644 --- a/phpBB/phpbb/message/topic_form.php +++ b/phpBB/phpbb/message/topic_form.php @@ -9,15 +9,31 @@ namespace phpbb\message; +/** +* Class topic_form +* Form used to send topics as notification emails +* +* @package phpbb\message +*/ class topic_form extends form { + /** @var int */ protected $topic_id; - + /** @var array */ protected $topic_row; + /** @var string */ protected $recipient_address; + /** @var string */ protected $recipient_name; + /** @var string */ protected $recipient_lang; + /** + * Get the data of the topic + * + * @param int $topic_id + * @return false|array false if the topic does not exist, array otherwise + */ protected function get_topic_row($topic_id) { $sql = 'SELECT forum_id, topic_title @@ -30,6 +46,9 @@ class topic_form extends form return $row; } + /** + * {inheritDoc} + */ public function check_allow() { $error = parent::check_allow(); @@ -61,6 +80,9 @@ class topic_form extends form return false; } + /** + * {inheritDoc} + */ public function bind(\phpbb\request\request_interface $request) { parent::bind($request); @@ -73,6 +95,9 @@ class topic_form extends form $this->topic_row = $this->get_topic_row($this->topic_id); } + /** + * {inheritDoc} + */ public function submit(\messenger $messenger) { if (!$this->recipient_address || !preg_match('/^' . get_preg_expression('email') . '$/i', $this->recipient_address)) @@ -102,11 +127,17 @@ class topic_form extends form parent::submit($messenger); } + /** + * {inheritDoc} + */ public function get_return_message() { return sprintf($this->user->lang['RETURN_TOPIC'], '', ''); } + /** + * {inheritDoc} + */ public function render(\phpbb\template\template $template) { parent::render($template); -- cgit v1.2.1