CMS  Version 3.9
Comment Class Reference

Inherits DataItem.

Public Member Functions

 User ()
 
 isEditable ()
 

Public Attributes

 $table = "comment"
 
 $primary_key = "comment_id"
 
 $default_format = "{title}"
 
 $fields
 
 $fieldAliases = array("description" => "Comment")
 
 $relations = array( "User" => "")
 

Detailed Description

Definition at line 39 of file comment.inc.

Member Function Documentation

◆ isEditable()

Comment::isEditable ( )

Definition at line 68 of file comment.inc.

69  {
70  global $user;
71 
72  if(!$user)
73  return false;
74 
75  return ((checkRole("admin") || $this->user_id == $user->user_id)) ? true : false;
76  }
global $user
$table column("Redirect From", "<a href='redirect_form?redirect_id={redirect_id}'>{redirect_from}</a>", true, "width: 30%") -> column("Redirect To", "<a href='{redirect_to}' target='_blank'>{redirect_to}</a>", true, "width: 30%") ->column("Last Modified", "{last_modified}", true, "width: 20%; text-align: center") ->column("Override", "{ override true
Definition: redirects.inc:9
$feedback user_id
Definition: save.inc:14

◆ User()

Comment::User ( )

Definition at line 61 of file comment.inc.

62  {
63  $mgr = new UserManager();
64  $className = $mgr->getUserClass();
65  return $this->getRelated($className);
66  }
Provides the interface to the user model for the application.

Member Data Documentation

◆ $default_format

Comment::$default_format = "{title}"

Definition at line 43 of file comment.inc.

◆ $fieldAliases

Comment::$fieldAliases = array("description" => "Comment")

Definition at line 55 of file comment.inc.

◆ $fields

Comment::$fields
Initial value:
= array("comment_id" => Number,
"title" => String,
"user_id" => Number,
"author" => String,
"date_posted" => Timestamp,
"description" => Text,
"published" => Boolean
)

Definition at line 46 of file comment.inc.

◆ $primary_key

Comment::$primary_key = "comment_id"

Definition at line 42 of file comment.inc.

◆ $relations

Comment::$relations = array( "User" => "")

Definition at line 59 of file comment.inc.

◆ $table

Comment::$table = "comment"

Definition at line 41 of file comment.inc.


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