generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathHasContentBlocks.php
33 lines (28 loc) · 1.04 KB
/
HasContentBlocks.php
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
<?php
namespace Statikbe\FilamentFlexibleContentBlocks\Models\Contracts;
use Filament\Forms\Components\Builder\Block;
use Statikbe\FilamentFlexibleContentBlocks\ContentBlocks\AbstractContentBlock;
/**
* @property array $content_blocks
*/
interface HasContentBlocks
{
/**
* Returns an array of the Filament blocks of all allowed content blocks for this resource.
* The order will be the order in which they are presented to the user.
*
* @return array<string, Block>
*/
public static function getFilamentContentBlocks(): array;
/**
* Returns an array of all allowed content block classes for this resource.
* The order will be the order in which they are presented to the user.
*
* @return array<class-string<AbstractContentBlock>>
*/
public static function registerContentBlocks(): array;
/**
* Extract all searchable text from the content blocks, to enable simple searching in content blocks.
*/
public function getSearchableBlockContent(bool $stripHtml = true): ?string;
}