|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace SleepingOwl\Admin\Factories; |
|
4
|
|
|
|
|
5
|
|
|
use SleepingOwl\Admin\AliasBinder; |
|
6
|
|
|
use SleepingOwl\Admin\Navigation\Page; |
|
7
|
|
|
use SleepingOwl\Admin\Display\DisplayTab; |
|
8
|
|
|
use SleepingOwl\Admin\Display\DisplayTree; |
|
9
|
|
|
use SleepingOwl\Admin\Display\DisplayTable; |
|
10
|
|
|
use Illuminate\Contracts\Support\Renderable; |
|
11
|
|
|
use SleepingOwl\Admin\Display\DisplayTabbed; |
|
12
|
|
|
use SleepingOwl\Admin\Contracts\AdminInterface; |
|
13
|
|
|
use Illuminate\Contracts\Foundation\Application; |
|
14
|
|
|
use SleepingOwl\Admin\Display\DisplayDatatables; |
|
15
|
|
|
use SleepingOwl\Admin\Display\DisplayDatatablesAsync; |
|
16
|
|
|
use SleepingOwl\Admin\Contracts\ModelConfigurationInterface; |
|
17
|
|
|
use SleepingOwl\Admin\Contracts\Display\DisplayFactoryInterface; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @method DisplayDatatables datatables() |
|
21
|
|
|
* @method DisplayDatatablesAsync datatablesAsync() |
|
22
|
|
|
* @method DisplayTab tab(Renderable $display) |
|
23
|
|
|
* @method DisplayTabbed tabbed(\Closure|array $tabs = null) |
|
24
|
|
|
* @method DisplayTable table() |
|
25
|
|
|
* @method DisplayTree tree() |
|
26
|
|
|
* @method Page page() |
|
27
|
|
|
*/ |
|
28
|
|
|
class DisplayFactory extends AliasBinder implements DisplayFactoryInterface |
|
29
|
|
|
{ |
|
30
|
|
|
/** |
|
31
|
|
|
* DisplayFactory constructor. |
|
32
|
|
|
* |
|
33
|
|
|
* @param Application $application |
|
34
|
|
|
*/ |
|
35
|
|
|
public function __construct(Application $application) |
|
36
|
|
|
{ |
|
37
|
|
|
parent::__construct($application); |
|
38
|
|
|
|
|
39
|
|
|
$this->register([ |
|
40
|
|
|
'datatables' => DisplayDatatables::class, |
|
41
|
|
|
'datatablesAsync' => DisplayDatatablesAsync::class, |
|
42
|
|
|
'tab' => DisplayTab::class, |
|
43
|
|
|
'tabbed' => DisplayTabbed::class, |
|
44
|
|
|
'table' => DisplayTable::class, |
|
45
|
|
|
'tree' => DisplayTree::class, |
|
46
|
|
|
'page' => Page::class, |
|
47
|
|
|
]); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|