public static function findByPk($varValue, array $arrOptions = array()) { if (static::$strPk == 'id') { return static::findById($varValue, $arrOptions); } return parent::findByPk($varValue, $arrOptions); }
/** * Generate the content element */ protected function compile() { if (($video = $this->getVideo()) === null) { return; } $video->setCustomName($this->vimeo_customName); $video->setPosterSize(deserialize($this->size, true)); // Enable the lightbox if ($this->vimeo_lightbox) { $video->enableLightbox(); // Enable the lightbox autoplay if ($this->vimeo_lightboxAutoplay) { $video->enableLightboxAutoplay(); } } // Enable the link if ($this->vimeo_link) { $video->enableLink(); $video->setLinkUrl($this->url); $video->setLinkTitle($this->titleText); } // Set a custom poster if ($this->vimeo_customPoster) { $fileModel = FilesModel::findByPk($this->singleSRC); if ($fileModel !== null && is_file(TL_ROOT . '/' . $fileModel->path)) { $video->setPoster($fileModel->path); } } $this->Template->buffer = $video->generate(new FrontendTemplate($this->vimeo_template)); }