Total Lines | 63 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | interface Repository |
||
6 | { |
||
7 | /** |
||
8 | * Scan themes directory. |
||
9 | */ |
||
10 | public function scan(); |
||
11 | |||
12 | /** |
||
13 | * Register theme.json file. |
||
14 | * |
||
15 | * @param \SplFileInfo $file |
||
16 | * @throws \Exception |
||
17 | */ |
||
18 | public function register($file); |
||
19 | |||
20 | /** |
||
21 | * Get all themes. |
||
22 | * |
||
23 | * @return \Illuminate\Support\Collection |
||
24 | */ |
||
25 | public function all(); |
||
26 | |||
27 | /** |
||
28 | * Get current frontend theme. |
||
29 | * |
||
30 | * @return \Yajra\CMS\Themes\Theme |
||
31 | * @throws \Yajra\CMS\Themes\Exceptions\ThemeNotFoundException |
||
32 | */ |
||
33 | public function current(); |
||
34 | |||
35 | /** |
||
36 | * Find or fail a theme. |
||
37 | * |
||
38 | * @param string $theme |
||
39 | * @param string $type |
||
40 | * @return \Yajra\CMS\Themes\Theme |
||
41 | * @throws \Yajra\CMS\Themes\Exceptions\ThemeNotFoundException |
||
42 | */ |
||
43 | public function findOrFail($theme, $type = 'frontend'); |
||
44 | |||
45 | /** |
||
46 | * Uninstall a theme. |
||
47 | * |
||
48 | * @param string $theme |
||
49 | * @return bool |
||
50 | */ |
||
51 | public function uninstall($theme); |
||
52 | |||
53 | /** |
||
54 | * Get directory path of the theme. |
||
55 | * |
||
56 | * @param string $theme |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getDirectoryPath($theme); |
||
60 | |||
61 | /** |
||
62 | * Get themes base path. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getBasePath(); |
||
67 | } |
||
68 |