generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathHasHeroImageAttributes.php
More file actions
58 lines (47 loc) · 1.46 KB
/
HasHeroImageAttributes.php
File metadata and controls
58 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
namespace Statikbe\FilamentFlexibleContentBlocks\Models\Contracts;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Spatie\MediaLibrary\MediaCollections\HtmlableMedia;
/**
* @property ?string $hero_image_title
* @property ?string $hero_image_copyright
*/
interface HasHeroImageAttributes
{
/**
* Returns the media-library relation to the hero image.
*/
public function heroImage(): MorphMany;
/**
* Adds a hero image to the media library collection
*/
public function addHeroImage(string $imagePath): void;
/**
* Returns the name of the media library conversion of the hero image
*/
public function getHeroImageConversionName(): string;
/**
* Returns media library collection of hero image
*/
public function getHeroImageCollection(): string;
/**
* Returns the url of the hero image
*/
public function getHeroImageUrl(?string $conversion = null): ?string;
/**
* Returns the rendered html of the hero image
*/
public function getHeroImageMedia(?string $conversion = null, array $attributes = []): ?HtmlableMedia;
/**
* Checks if there is a hero image set.
*/
public function hasHeroImage(): bool;
/**
* Returns the title of the hero image
*/
public function getHeroImageTitle(): ?string;
/**
* Returns the copyright description of the hero image
*/
public function getHeroImageCopyright(): ?string;
}