proxitok/app/Models/VideoTemplate.php

25 lines
530 B
PHP
Raw Permalink Normal View History

2022-04-10 06:10:48 -04:00
<?php
namespace App\Models;
2022-11-26 17:51:45 -05:00
use TikScraper\Models\Info;
2022-04-10 06:10:48 -04:00
/**
* Base for templates with a feed
*/
class VideoTemplate extends BaseTemplate {
public object $item;
2022-11-26 17:51:45 -05:00
public Info $info;
2022-04-10 06:10:48 -04:00
public string $layout = 'hero';
2022-11-26 17:51:45 -05:00
function __construct(object $item, Info $info, bool $isEmbed = false) {
2022-04-10 06:10:48 -04:00
parent::__construct('Video');
$this->item = $item;
2022-11-26 17:51:45 -05:00
$this->info = $info;
2022-04-10 06:10:48 -04:00
if ($isEmbed) {
$this->layout = 'embed';
} else {
$this->layout = 'hero';
}
}
}