Collaboration diagram for ilForumProperties:Public Member Functions | |
| insert () | |
| update () | |
| copy ($a_new_obj_id) | |
| setDefaultView ($a_default_view) | |
| getDefaultView () | |
| setStatisticsStatus ($a_statistic_status) | |
| isStatisticEnabled () | |
| setAnonymisation ($a_anonymized) | |
| isAnonymized () | |
| setPostActivation ($a_post_activation) | |
| isPostActivationEnabled () | |
| setObjId ($a_obj_id=0) | |
| getObjId () | |
Static Public Member Functions | |
| static | getInstance ($a_obj_id=0) |
| static | _isAnonymized ($a_obj_id) |
Protected Member Functions | |
| __construct ($a_obj_id=0) | |
Private Member Functions | |
| __clone () | |
| read () | |
Private Attributes | |
| $obj_id | |
| Object id of current forum private. | |
| $default_view = 1 | |
| Default view ( 1 => 'order by answers', 2 => 'order by date') private. | |
| $anonymized = false | |
| Defines if a forum is anonymized or not private. | |
| $statistics_enabled = false | |
| Defines if a forum can show ranking statistics private. | |
| $post_activation_enabled = false | |
| Activation of new posts private. | |
| $db = null | |
| DB Object private. | |
Static Private Attributes | |
| static | $instances = array() |
Definition at line 30 of file class.ilForumProperties.php.
| ilForumProperties::__construct | ( | $ | a_obj_id = 0 |
) | [protected] |
Definition at line 70 of file class.ilForumProperties.php.
References read().
{
global $ilDB;
$this->db = $ilDB;
$this->obj_id = $a_obj_id;
$this->read();
}
Here is the call graph for this function:| ilForumProperties::__clone | ( | ) | [private] |
Definition at line 79 of file class.ilForumProperties.php.
{
}
| static ilForumProperties::_isAnonymized | ( | $ | a_obj_id | ) | [static] |
Definition at line 200 of file class.ilForumProperties.php.
Referenced by ilPDNewsTableGUI::fillRow().
{
global $ilDB;
$q = "SELECT anonymized FROM frm_settings WHERE ";
$q .= "obj_id = ".$ilDB->quote($a_obj_id)."";
return $ilDB->getOne($q);
}
Here is the caller graph for this function:| ilForumProperties::copy | ( | $ | a_new_obj_id | ) |
Definition at line 157 of file class.ilForumProperties.php.
{
if ($a_new_obj_id)
{
$query = "INSERT INTO frm_settings "
."SET "
."obj_id = " . $this->db->quote($a_new_obj_id). ", "
."default_view = " . $this->db->quote($this->default_view). ", "
."anonymized = " . $this->db->quote($this->anonymized). ", "
."statistics_enabled = " . $this->db->quote($this->statistics_enabled). ", "
."post_activation = " . $this->db->quote($this->post_activation_enabled). " ";
$this->db->query($query);
return true;
}
return false;
}
| ilForumProperties::getDefaultView | ( | ) |
Definition at line 180 of file class.ilForumProperties.php.
{
return $this->default_view;
}
| static ilForumProperties::getInstance | ( | $ | a_obj_id = 0 |
) | [static] |
Definition at line 83 of file class.ilForumProperties.php.
Referenced by ilObjForum::cloneObject(), ilForumExportGUI::exportHTML(), ilObjForumListGUI::getProperties(), ilForumExplorer::ilForumExplorer(), ilObjForumGUI::ilObjForumGUI(), ilForumExportGUI::printPost(), ilForumExportGUI::printThread(), ilForum::sendForumNotifications(), and ilForum::sendThreadNotifications().
{
if (!self::$instances[$a_obj_id])
{
self::$instances[$a_obj_id] = new ilForumProperties($a_obj_id);
}
return self::$instances[$a_obj_id];
}
Here is the caller graph for this function:| ilForumProperties::getObjId | ( | ) |
Definition at line 222 of file class.ilForumProperties.php.
{
return $this->obj_id;
}
| ilForumProperties::insert | ( | ) |
Definition at line 119 of file class.ilForumProperties.php.
{
if ($this->obj_id)
{
$query = "INSERT INTO frm_settings "
."SET "
."obj_id = " . $this->db->quote($this->obj_id). ", "
."default_view = " . $this->db->quote($this->default_view). ", "
."anonymized = " . $this->db->quote($this->anonymized). ", "
."statistics_enabled = " . $this->db->quote($this->statistics_enabled). ", "
."post_activation = " . $this->db->quote($this->post_activation_enabled). " ";
$this->db->query($query);
return true;
}
return false;
}
| ilForumProperties::isAnonymized | ( | ) |
Definition at line 196 of file class.ilForumProperties.php.
{
return $this->anonymized;
}
| ilForumProperties::isPostActivationEnabled | ( | ) |
Definition at line 213 of file class.ilForumProperties.php.
{
return $this->post_activation_enabled;
}
| ilForumProperties::isStatisticEnabled | ( | ) |
Definition at line 188 of file class.ilForumProperties.php.
{
return $this->statistics_enabled;
}
| ilForumProperties::read | ( | ) | [private] |
Definition at line 93 of file class.ilForumProperties.php.
Referenced by __construct(), and setObjId().
{
if ($this->obj_id)
{
$query = "SELECT *
FROM frm_settings
WHERE 1
AND obj_id = " . $this->db->quote($this->obj_id) . " ";
$row = $this->db->getrow($query);
if (is_object($row))
{
$this->default_view = $row->default_view;
$this->anonymized = $row->anonymized == 1 ? true : false;
$this->statistics_enabled = $row->statistics_enabled == 1 ? true : false;
$this->post_activation_enabled = $row->post_activation == 1 ? true : false;
return true;
}
return false;
}
return false;
}
Here is the caller graph for this function:| ilForumProperties::setAnonymisation | ( | $ | a_anonymized | ) |
Definition at line 192 of file class.ilForumProperties.php.
{
$this->anonymized = $a_anonymized;
}
| ilForumProperties::setDefaultView | ( | $ | a_default_view | ) |
Definition at line 176 of file class.ilForumProperties.php.
{
$this->default_view = $a_default_view;
}
| ilForumProperties::setObjId | ( | $ | a_obj_id = 0 |
) |
Definition at line 217 of file class.ilForumProperties.php.
References read().
{
$this->obj_id = $a_obj_id;
$this->read();
}
Here is the call graph for this function:| ilForumProperties::setPostActivation | ( | $ | a_post_activation | ) |
Definition at line 209 of file class.ilForumProperties.php.
{
$this->post_activation_enabled = $a_post_activation;
}
| ilForumProperties::setStatisticsStatus | ( | $ | a_statistic_status | ) |
Definition at line 184 of file class.ilForumProperties.php.
{
$this->statistics_enabled = $a_statistic_status;
}
| ilForumProperties::update | ( | ) |
Definition at line 138 of file class.ilForumProperties.php.
{
if ($this->obj_id)
{
$query = "UPDATE frm_settings "
."SET "
."default_view = " . $this->db->quote($this->default_view). ", "
."anonymized = " . $this->db->quote($this->anonymized). ", "
."statistics_enabled = " . $this->db->quote($this->statistics_enabled). ", "
."post_activation = " . $this->db->quote($this->post_activation_enabled). " "
."WHERE obj_id = ". $this->db->quote($this->obj_id) ." ";
$this->db->query($query);
return true;
}
return false;
}
ilForumProperties::$anonymized = false [private] |
Defines if a forum is anonymized or not private.
Definition at line 48 of file class.ilForumProperties.php.
ilForumProperties::$db = null [private] |
DB Object private.
Definition at line 66 of file class.ilForumProperties.php.
ilForumProperties::$default_view = 1 [private] |
Default view ( 1 => 'order by answers', 2 => 'order by date') private.
Definition at line 42 of file class.ilForumProperties.php.
ilForumProperties::$instances = array() [static, private] |
Definition at line 68 of file class.ilForumProperties.php.
ilForumProperties::$obj_id [private] |
Object id of current forum private.
Definition at line 36 of file class.ilForumProperties.php.
ilForumProperties::$post_activation_enabled = false [private] |
Activation of new posts private.
Definition at line 60 of file class.ilForumProperties.php.
ilForumProperties::$statistics_enabled = false [private] |
Defines if a forum can show ranking statistics private.
Definition at line 54 of file class.ilForumProperties.php.
1.7.1