1 | <?php |
||
8 | class CacheRepository implements Repository |
||
9 | { |
||
10 | use ValidatesRequests; |
||
11 | |||
12 | /** |
||
13 | * @var \Yajra\CMS\Repositories\Extension\Repository |
||
14 | */ |
||
15 | protected $repository; |
||
16 | |||
17 | /** |
||
18 | * @var \Illuminate\Contracts\Cache\Repository |
||
19 | */ |
||
20 | protected $cache; |
||
21 | |||
22 | /** |
||
23 | * CacheRepository constructor. |
||
24 | * |
||
25 | * @param \Yajra\CMS\Repositories\Extension\Repository $repository |
||
26 | * @param \Illuminate\Contracts\Cache\Repository $cache |
||
27 | */ |
||
28 | public function __construct(Repository $repository, Cache $cache) |
||
33 | |||
34 | /** |
||
35 | * Install an extension. |
||
36 | * |
||
37 | * @param string $type |
||
38 | * @param array $attributes |
||
39 | * @return \Yajra\CMS\Entities\Extension |
||
40 | */ |
||
41 | public function install($type, array $attributes) |
||
45 | |||
46 | /** |
||
47 | * Get all extensions. |
||
48 | * |
||
49 | * @return \Illuminate\Database\Eloquent\Collection|static[] |
||
50 | */ |
||
51 | public function all() |
||
57 | |||
58 | /** |
||
59 | * Uninstall extension. |
||
60 | * |
||
61 | * @param int $id |
||
62 | * @throws \Exception |
||
63 | */ |
||
64 | public function uninstall($id) |
||
68 | |||
69 | /** |
||
70 | * Find or fail an extension. |
||
71 | * |
||
72 | * @param int $id |
||
73 | * @return \Yajra\CMS\Entities\Extension |
||
74 | */ |
||
75 | public function findOrFail($id) |
||
81 | |||
82 | /** |
||
83 | * Register an extension using manifest config file. |
||
84 | * |
||
85 | * @param string $path |
||
86 | * @throws \Exception |
||
87 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
88 | */ |
||
89 | public function registerManifest($path) |
||
93 | |||
94 | /** |
||
95 | * Register an extension. |
||
96 | * |
||
97 | * @param array $attributes |
||
98 | * @return $this |
||
99 | * @throws \Exception |
||
100 | */ |
||
101 | public function register(array $attributes) |
||
105 | |||
106 | /** |
||
107 | * Get all registered widgets. |
||
108 | * |
||
109 | * @return \Illuminate\Support\Collection |
||
110 | */ |
||
111 | public function allWidgets() |
||
117 | } |
||
118 |