CMS  Version 3.9
Topic Class Reference

This class maps the topic table. More...

Inherits DataItem.

Public Member Functions

 Documents ($constraints="")
 
 Topic ()
 

Static Public Member Functions

static getTopicsArray ()
 

Public Attributes

 $fields
 
 $relations = array( "Documents" => Document)
 

Detailed Description

This class maps the topic table.

Definition at line 37 of file topic.inc.

Member Function Documentation

◆ Documents()

Topic::Documents (   $constraints = "")

Definition at line 49 of file topic.inc.

50  {
51  return $this->crossReference(Document, DocumentTopicXref, $constraints);
52  }
This class maps the publication table.
Definition: document.inc:43

◆ getTopicsArray()

static Topic::getTopicsArray ( )
static

Definition at line 54 of file topic.inc.

55  {
56  $topics = query(Topic, "ORDER BY topic");
57 
58  $tarr = array();
59 
60  foreach($topics as $topic)
61  {
62  $tarr[$topic->topic] = $topic->topic;
63  }
64 
65  return $tarr;
66  }
This class maps the topic table.
Definition: topic.inc:38
$topics
Definition: group_form.inc:52
$topic
Definition: topic_form.inc:42

◆ Topic()

Topic::Topic ( )

Definition at line 68 of file topic.inc.

69  {
70  $this->primary_key = "topic_id";
71  $this->table = "topic";
72 
73  $this->default_format = "{topic}";
74 
75  $this->DataItem(func_get_args());
76  }

Member Data Documentation

◆ $fields

Topic::$fields
Initial value:
= array("topic_id" => Number,
"topic" => String
)

Definition at line 41 of file topic.inc.

◆ $relations

Topic::$relations = array( "Documents" => Document)

Definition at line 47 of file topic.inc.


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