parent
fa3f1e0a7c
commit
ee6e8b0593
15 changed files with 47 additions and 84 deletions
|
|
@ -1,19 +1,16 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use TikScraper\Models\Feed;
|
||||
use TikScraper\Models\Info;
|
||||
use TikScraper\Models\Full;
|
||||
|
||||
/**
|
||||
* Base for templates with both info and feed
|
||||
*/
|
||||
class FullTemplate extends BaseTemplate {
|
||||
public Info $info;
|
||||
public Feed $feed;
|
||||
public Full $data;
|
||||
|
||||
function __construct(string $title, Info $info, Feed $feed) {
|
||||
function __construct(string $title, Full $data) {
|
||||
parent::__construct($title);
|
||||
$this->info = $info;
|
||||
$this->feed = $feed;
|
||||
$this->data = $data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use TikScraper\Models\Info;
|
||||
|
||||
/**
|
||||
* Base for templates with a feed
|
||||
*/
|
||||
class VideoTemplate extends BaseTemplate {
|
||||
public object $item;
|
||||
public Info $info;
|
||||
public object $detail;
|
||||
public string $layout = 'hero';
|
||||
|
||||
function __construct(object $item, Info $info, bool $isEmbed = false) {
|
||||
function __construct(object $item, object $detail, bool $isEmbed = false) {
|
||||
parent::__construct('Video');
|
||||
$this->item = $item;
|
||||
$this->info = $info;
|
||||
$this->detail = $detail;
|
||||
if ($isEmbed) {
|
||||
$this->layout = 'embed';
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue