aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/message/topic_form.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-13 23:24:10 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-29 02:14:32 +0200
commit67cf0a912c8ed24c7466163fa409e8154082e1df (patch)
tree5facb3b147d93e329f06a068d0005bb208ec9760 /phpBB/phpbb/message/topic_form.php
parent5c13829111efffc8032db65cee83bcc80812bc1d (diff)
downloadforums-67cf0a912c8ed24c7466163fa409e8154082e1df.tar
forums-67cf0a912c8ed24c7466163fa409e8154082e1df.tar.gz
forums-67cf0a912c8ed24c7466163fa409e8154082e1df.tar.bz2
forums-67cf0a912c8ed24c7466163fa409e8154082e1df.tar.xz
forums-67cf0a912c8ed24c7466163fa409e8154082e1df.zip
[ticket/10073] Add doc blocks to new classes
PHPBB3-10073
Diffstat (limited to 'phpBB/phpbb/message/topic_form.php')
-rw-r--r--phpBB/phpbb/message/topic_form.php33
1 files changed, 32 insertions, 1 deletions
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'], '<a href="' . append_sid($this->phpbb_root_path . 'viewtopic.' . $this->phpEx, 'f=' . $this->topic_row['forum_id'] . '&amp;t=' . $this->topic_id) . '">', '</a>');
}
+ /**
+ * {inheritDoc}
+ */
public function render(\phpbb\template\template $template)
{
parent::render($template);