1 | <?php |
||
36 | class PageController extends Controller { |
||
37 | |||
38 | use HttpError; |
||
39 | |||
40 | /** @var Environment */ |
||
41 | private $environment; |
||
42 | /** @var IURLGenerator */ |
||
43 | private $urlGenerator; |
||
44 | /** @var IConfig */ |
||
45 | private $appConfig; |
||
46 | /** @var IAppManager */ |
||
47 | private $appManager; |
||
48 | |||
49 | /** |
||
50 | * Constructor |
||
51 | * |
||
52 | * @param string $appName |
||
53 | * @param IRequest $request |
||
54 | * @param Environment $environment |
||
55 | * @param IURLGenerator $urlGenerator |
||
56 | * @param IConfig $appConfig |
||
57 | * @param IAppManager $appManager |
||
58 | */ |
||
59 | 12 | public function __construct( |
|
74 | |||
75 | /** |
||
76 | * @NoAdminRequired |
||
77 | * @NoCSRFRequired |
||
78 | * |
||
79 | * Shows the albums and pictures at the root folder or a message if |
||
80 | * there are no pictures. |
||
81 | * |
||
82 | * This is the entry page for logged-in users accessing the app from |
||
83 | * within ownCloud. |
||
84 | * A TemplateResponse response uses a template from the templates folder |
||
85 | * and parameters provided here to build the page users will see |
||
86 | * |
||
87 | * @return TemplateResponse |
||
88 | */ |
||
89 | 4 | public function index() { |
|
121 | |||
122 | /** |
||
123 | * @PublicPage |
||
124 | * @NoCSRFRequired |
||
125 | * |
||
126 | * Shows the albums and pictures or redirects to the download location the token gives access to |
||
127 | * |
||
128 | * @param string $token |
||
129 | * @param null|string $filename |
||
130 | * |
||
131 | * @return TemplateResponse|ImageResponse|RedirectResponse |
||
132 | */ |
||
133 | 4 | public function publicIndex($token, $filename) { |
|
150 | |||
151 | /** |
||
152 | * @PublicPage |
||
153 | * @NoCSRFRequired |
||
154 | * @Guest |
||
155 | * |
||
156 | * Generates an error page based on the error code |
||
157 | * |
||
158 | * @param int $code |
||
159 | * |
||
160 | * @return TemplateResponse |
||
161 | */ |
||
162 | 3 | public function errorPage($code) { |
|
177 | |||
178 | /** |
||
179 | * Adds the domain "data:" to the allowed image domains |
||
180 | * this function is called by reference |
||
181 | * |
||
182 | * @param TemplateResponse $response |
||
183 | */ |
||
184 | 4 | private function addContentSecurityToResponse($response) { |
|
190 | |||
191 | /** |
||
192 | * @PublicPage |
||
193 | * @NoCSRFRequired |
||
194 | * @Guest |
||
195 | * |
||
196 | * Returns the slideshow template |
||
197 | * |
||
198 | * @return TemplateResponse |
||
199 | */ |
||
200 | 1 | public function slideshow() { |
|
203 | |||
204 | /** |
||
205 | * Shows the albums and pictures the token gives access to |
||
206 | * |
||
207 | * @param $token |
||
208 | * |
||
209 | * @return TemplateResponse |
||
210 | */ |
||
211 | 1 | private function showPublicPage($token) { |
|
232 | |||
233 | /** |
||
234 | * Determines if we can add external shared to this instance |
||
235 | * |
||
236 | * @return array<bool,string> |
||
237 | */ |
||
238 | 1 | private function getServer2ServerProperties() { |
|
248 | } |
||
249 |