ILIAS  Release_4_0_x_branch Revision 61816
 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 = 0
 Defines if a forum is anonymized or not private.
 $statistics_enabled = 0
 Defines if a forum can show ranking statistics private.
 $post_activation_enabled = 0
 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 $ilDB, and 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 204 of file class.ilForumProperties.php.

References $ilDB, and $result.

Referenced by ilPDNewsTableGUI\fillRow().

{
global $ilDB;
$result = $ilDB->queryf("SELECT anonymized FROM frm_settings WHERE obj_id = %s",
array('integer'),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 159 of file class.ilForumProperties.php.

{
if ($a_new_obj_id)
{
$statement = $this->db->manipulateF('INSERT INTO frm_settings
( obj_id,
default_view,
anonymized,
statistics_enabled,
post_activation
)
VALUES( %s, %s, %s, %s, %s)',
array ('integer', 'integer', 'integer', 'integer', 'integer'),
array($a_new_obj_id, $this->default_view, $this->anonymized, $this->statistics_enabled, $this->post_activation_enabled));
return true;
}
return false;
}
ilForumProperties::getDefaultView ( )

Definition at line 184 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(), and ilObjForumGUI\ilObjForumGUI().

{
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 232 of file class.ilForumProperties.php.

References $obj_id.

{
return $this->obj_id;
}
ilForumProperties::insert ( )

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

{
if ($this->obj_id)
{
$statement = $this->db->manipulateF('INSERT INTO frm_settings
( obj_id,
default_view,
anonymized,
statistics_enabled,
post_activation
)
VALUES( %s, %s, %s, %s, %s)',
array('integer', 'integer', 'integer', 'integer', 'integer'),
array($this->obj_id, $this->default_view, $this->anonymized, $this->statistics_enabled, $this->post_activation_enabled));
return true;
}
return false;
}
ilForumProperties::isAnonymized ( )

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

References $anonymized.

{
}
ilForumProperties::isPostActivationEnabled ( )

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

References $post_activation_enabled.

ilForumProperties::isStatisticEnabled ( )

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

References $statistics_enabled.

ilForumProperties::read ( )
private

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

References $res, and $row.

Referenced by __construct(), and setObjId().

{
if ($this->obj_id)
{
$res = $this->db->queryf('
SELECT * FROM frm_settings
WHERE obj_id = %s',
array('integer'), array($this->obj_id));
$row = $this->db->fetchObject($res);
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 196 of file class.ilForumProperties.php.

{
$this->anonymized = $a_anonymized;
}
ilForumProperties::setDefaultView (   $a_default_view)

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

{
$this->default_view = $a_default_view;
}
ilForumProperties::setObjId (   $a_obj_id = 0)

Definition at line 227 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 219 of file class.ilForumProperties.php.

{
$this->post_activation_enabled = $a_post_activation;
}
ilForumProperties::setStatisticsStatus (   $a_statistic_status)

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

{
$this->statistics_enabled = $a_statistic_status;
}
ilForumProperties::update ( )

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

{
if ($this->obj_id)
{
$statement = $this->db->manipulateF('UPDATE frm_settings
SET default_view = %s,
anonymized = %s,
statistics_enabled = %s,
post_activation = %s
WHERE obj_id = %s',
array ('integer', 'integer', 'integer', 'integer', 'integer'),
array($this->default_view, $this->anonymized, $this->statistics_enabled, $this->post_activation_enabled, $this->obj_id));
return true;
}
return false;
}

Field Documentation

ilForumProperties::$anonymized = 0
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 = 0
private

Activation of new posts private.

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

Referenced by isPostActivationEnabled().

ilForumProperties::$statistics_enabled = 0
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: