Template.php
809 Bytes
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
<?php
namespace ACA\BeaverBuilder\ListScreen;
use AC\Type\Uri;
use ACP;
class Template extends ACP\ListScreen\Post
{
public const POST_TYPE = 'fl-builder-template';
private $template_page;
private $custom_label;
public function __construct(string $template_page, string $label)
{
parent::__construct('fl-builder-template', self::POST_TYPE . $template_page);
$this->template_page = $template_page;
$this->custom_label = $label;
$this->set_group('beaver_builder')
->set_label($label);
}
public function get_label(): ?string
{
return $this->custom_label;
}
public function get_table_url(): Uri
{
return parent::get_table_url()->with_arg('fl-builder-template-type', $this->template_page);
}
}