1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103:
<?php
class CommentsTopic
{
protected $module_id;
protected $topic_identifier = '';
protected $id_in_module;
protected $url;
const DEFAULT_TOPIC_IDENTIFIER = 'default';
public function __construct($module_id, $topic_identifier = self::DEFAULT_TOPIC_IDENTIFIER)
{
$this->module_id = $module_id;
$this->topic_identifier = $topic_identifier;
}
public function get_authorizations()
{
return new CommentsAuthorizations();
}
public function is_display()
{
return false;
}
public function get_number_comments_display()
{
return CommentsConfig::load()->get_number_comments_display();
}
public function get_events()
{
return new CommentsTopicEvents($this);
}
public function display()
{
return CommentsService::display($this);
}
public function get_topic_identifier()
{
return $this->topic_identifier;
}
public function get_module_id()
{
return $this->module_id;
}
public function set_id_in_module($id_in_module)
{
$this->id_in_module = $id_in_module;
}
public function get_id_in_module()
{
return $this->id_in_module;
}
public function set_url(Url $url)
{
$this->url = $url;
}
public function get_url()
{
return $this->url->rel();
}
public function get_path()
{
return $this->url->relative();
}
}
?>