CMS  Version 3.9
DocumentCommentXref Class Reference

Inherits DataItem.

Public Member Functions

 verifyEnabled ($document_id)
 
 getURL ()
 
 Document ()
 
 Comment ()
 

Public Attributes

 $table = "document_comment_xref"
 
 $primary_key = "document_comment_id"
 
 $fields
 
 $relations
 

Detailed Description

Definition at line 256 of file document.inc.

Member Function Documentation

◆ Comment()

DocumentCommentXref::Comment ( )

Definition at line 298 of file document.inc.

299  {
300  return $this->getRelated(Comment);
301  }

◆ Document()

DocumentCommentXref::Document ( )

Definition at line 293 of file document.inc.

294  {
295  return $this->getRelated(Document);
296  }
This class maps the publication table.
Definition: document.inc:43

◆ getURL()

DocumentCommentXref::getURL ( )

Definition at line 285 of file document.inc.

286  {
287  if(!$this->document_id) return "";
288 
289  $url = "document_details?document_id={$this->document_id}";
290  return $url . $this->format("#comment{comment_id}");
291  }
$d document_id
Definition: download.inc:67
if(! $blog->published||! $blog->enable_rss_feed||!checkRole($blog->allow_read)) $url
Definition: rss.inc:58

◆ verifyEnabled()

DocumentCommentXref::verifyEnabled (   $document_id)

Definition at line 268 of file document.inc.

269  {
270  if (!$document_id) return false;
271  checkNumeric($document_id);
272 
273  try
274  {
276  $library = $document->DocumentLibrary();
277  return $library->allow_comments;
278  }
279  catch(DataNotFoundException $e)
280  {
281  return false;
282  }
283  }
if(! $document_library_id) $library
$document_id
Definition: delete.inc:37
if(! $document_id) $document
Definition: delete.inc:43

Member Data Documentation

◆ $fields

DocumentCommentXref::$fields
Initial value:
= array("document_comment_id" => Number,
"document_id" => Number,
"comment_id" => Number)

Definition at line 261 of file document.inc.

◆ $primary_key

DocumentCommentXref::$primary_key = "document_comment_id"

Definition at line 259 of file document.inc.

◆ $relations

DocumentCommentXref::$relations
Initial value:
= array( "Document" => Document,
"Comment" => Comment)

Definition at line 265 of file document.inc.

◆ $table

DocumentCommentXref::$table = "document_comment_xref"

Definition at line 258 of file document.inc.


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