CMS  Version 3.9
VideoGallery Class Reference

Inherits DataItem.

Public Member Functions

 Videos ($constraint="")
 
 Owner ()
 
 getOwnerName ()
 
 countVideos ($constraint="")
 
 getGalleryDirectory ()
 
 VideoGallery ()
 

Static Public Member Functions

static findByIdentifier ($identifier)
 

Public Attributes

 $fields
 
 $relations
 

Detailed Description

Definition at line 39 of file video_gallery.inc.

Member Function Documentation

◆ countVideos()

VideoGallery::countVideos (   $constraint = "")

Definition at line 77 of file video_gallery.inc.

78  {
79  if ($constraint)
80  {
81  $constraint .= " AND ";
82  }
83  else
84  {
85  $constraint = "WHERE ";
86  }
87  $constraint .= "video_gallery_id={$this->video_gallery_id}";
88  return queryValue(Video, "COUNT(1)", $constraint);
89  }
$constraint
Definition: video.inc:42

◆ findByIdentifier()

static VideoGallery::findByIdentifier (   $identifier)
static

Definition at line 96 of file video_gallery.inc.

97  {
98  $match = Query::create(VideoGallery, "WHERE identifier=:id")
99  ->bind(":id", $identifier)
100  ->executeSingle();
101 
102  return $match;
103  }
$identifier
Definition: rss.inc:37

◆ getGalleryDirectory()

VideoGallery::getGalleryDirectory ( )

Definition at line 91 of file video_gallery.inc.

92  {
93  return VideoManager::getVideoFolder() . DIRECTORY_SEPARATOR . "gallery_{$this->video_gallery_id}";
94  }
static getVideoFolder()

◆ getOwnerName()

VideoGallery::getOwnerName ( )

Definition at line 72 of file video_gallery.inc.

73  {
74  return $this->Owner()->getFullName();
75  }

◆ Owner()

VideoGallery::Owner ( )

Definition at line 66 of file video_gallery.inc.

67  {
68  $mgr = new UserManager();
69  return $mgr->getUser($this->owner_id);
70  }
$calendar owner_id
Provides the interface to the user model for the application.

◆ VideoGallery()

VideoGallery::VideoGallery ( )

Definition at line 105 of file video_gallery.inc.

106  {
107  $this->primary_key = "video_gallery_id";
108  $this->table = "video_gallery";
109 
110  // Patch in the user class, since this can be overridden by the application
111  $mgr = new UserManager();
112  $this->relations["Owner"] = $mgr->getUserClass();
113 
114  $this->default_format = "{gallery_name}";
115 
116  $this->DataItem(func_get_args());
117  }

◆ Videos()

VideoGallery::Videos (   $constraint = "")

Definition at line 61 of file video_gallery.inc.

62  {
63  return $this->getRelatedList(Video, "", $constraint);
64  }

Member Data Documentation

◆ $fields

VideoGallery::$fields
Initial value:
= array("video_gallery_id" => Number,
"gallery_name" => String,
"identifier" => String,
"description" => HTML,
"keywords" => String,
"hidden" => Boolean,
"owner_id" => Number,
"read_access" => String,
"write_access" => String,
"published" => Boolean,
"last_modified" => Timestamp)

Definition at line 43 of file video_gallery.inc.

◆ $relations

VideoGallery::$relations
Initial value:
= array( "Videos" => Video,
"Owner" => "")

Definition at line 57 of file video_gallery.inc.


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