diff options
Diffstat (limited to 'app/class/Page.php')
-rw-r--r-- | app/class/Page.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/app/class/Page.php b/app/class/Page.php index fff98dc..8adf418 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -35,6 +35,7 @@ class Page extends Dbitem protected $templatejavascript; protected $templateoptions; protected $favicon; + protected $thumbnail; protected $authors; protected $invites; protected $readers; @@ -93,6 +94,7 @@ class Page extends Dbitem $this->settemplatejavascript(''); $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'thumbnail', 'reccursivecss']); $this->setfavicon(''); + $this->setthumbnail(''); $this->setauthors([]); $this->setinvites([]); $this->setreaders([]); @@ -112,22 +114,6 @@ class Page extends Dbitem return ['pagevarlist' => $classvarlist]; } - /** - * Check if page have a thumbnail - * @return bool true if the page have a thumbnail otherwise return false. - */ - public function thumbnailexist() : bool - { - $thumbnaillink = Model::THUMBNAIL_DIR . $this->id . '.jpg'; - - $test = file_exists($thumbnaillink); - - $exist = file_exists(Model::THUMBNAIL_DIR . $this->id . '.jpg'); - - return $exist; - } - - // _____________________________________________________ G E T ____________________________________________________ public function id($type = 'string') @@ -382,6 +368,11 @@ class Page extends Dbitem return $this->favicon; } + public function thumbnail($type = 'string') + { + return $this->thumbnail; + } + public function authors($type = 'array') { if($type == 'string') { @@ -681,6 +672,13 @@ class Page extends Dbitem } } + public function setthumbnail($thumbnail) + { + if (is_string($thumbnail)) { + $this->thumbnail = $thumbnail; + } + } + public function setauthors($authors) { if(is_array($authors)) { |