ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilForumProperties Class Reference
+ 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()

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 30 of file class.ilForumProperties.php.

Constructor & Destructor Documentation

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:

Member Function Documentation

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.

References $result.

Referenced by ilPDNewsTableGUI\fillRow().

{
global $ilDB;
$query = $ilDB->prepare("SELECT anonymized FROM frm_settings WHERE obj_id = ?",
array('integer'));
$result = $ilDB->execute($query, array($a_obj_id));
while($record = $ilDB->fetchAssoc($result))
{
return $record['anonymized'];
}
return 0;
}

+ 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.

References $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 229 of file class.ilForumProperties.php.

References $obj_id.

{
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.

References $anonymized.

{
}
ilForumProperties::isPostActivationEnabled ( )

Definition at line 220 of file class.ilForumProperties.php.

References $post_activation_enabled.

ilForumProperties::isStatisticEnabled ( )

Definition at line 188 of file class.ilForumProperties.php.

References $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 224 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 216 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;
}

Field Documentation

ilForumProperties::$anonymized = false
private

Defines if a forum is anonymized or not private.

Definition at line 48 of file class.ilForumProperties.php.

Referenced by isAnonymized().

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.

Referenced by getDefaultView().

ilForumProperties::$instances = array()
staticprivate

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.

Referenced by getObjId().

ilForumProperties::$post_activation_enabled = false
private

Activation of new posts private.

Definition at line 60 of file class.ilForumProperties.php.

Referenced by isPostActivationEnabled().

ilForumProperties::$statistics_enabled = false
private

Defines if a forum can show ranking statistics private.

Definition at line 54 of file class.ilForumProperties.php.

Referenced by isStatisticEnabled().


The documentation for this class was generated from the following file: