| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2021-09-16 14:21:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* | 
					
						
							|  |  |  |  * breadcrumbs.php | 
					
						
							|  |  |  |  * Copyright (c) 2021 james@firefly-iii.org | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is part of Firefly III (https://github.com/firefly-iii). | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU Affero General Public License as | 
					
						
							|  |  |  |  * published by the Free Software Foundation, either version 3 of the | 
					
						
							|  |  |  |  * License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU Affero General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  |  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-03 12:32:02 +02:00
										 |  |  | declare(strict_types=1); | 
					
						
							| 
									
										
										
										
											2024-03-10 06:17:31 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-17 20:23:02 +01:00
										 |  |  | use Diglactic\Breadcrumbs\Generator; | 
					
						
							|  |  |  | use Diglactic\Breadcrumbs\Manager; | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | return [ | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | View Name | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | Choose a view to display when Breadcrumbs::render() is called. | 
					
						
							|  |  |  |     | Built in templates are: | 
					
						
							|  |  |  |     | | 
					
						
							| 
									
										
										
										
											2021-05-24 12:40:39 +02:00
										 |  |  |     | - 'breadcrumbs::bootstrap5'  - Bootstrap 5 | 
					
						
							|  |  |  |     | - 'breadcrumbs::bootstrap4'  - Bootstrap 4 | 
					
						
							|  |  |  |     | - 'breadcrumbs::bootstrap3'  - Bootstrap 3 | 
					
						
							|  |  |  |     | - 'breadcrumbs::bootstrap2'  - Bootstrap 2 | 
					
						
							|  |  |  |     | - 'breadcrumbs::bulma'       - Bulma | 
					
						
							|  |  |  |     | - 'breadcrumbs::foundation6' - Foundation 6 | 
					
						
							|  |  |  |     | - 'breadcrumbs::json-ld'     - JSON-LD Structured Data | 
					
						
							|  |  |  |     | - 'breadcrumbs::materialize' - Materialize | 
					
						
							|  |  |  |     | - 'breadcrumbs::tailwind'    - Tailwind CSS | 
					
						
							|  |  |  |     | - 'breadcrumbs::uikit'       - UIkit | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  |     | | 
					
						
							|  |  |  |     | Or a custom view, e.g. '_partials/breadcrumbs'. | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'view'                                     => 'partials/layout/breadcrumbs', | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | Breadcrumbs File(s) | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | The file(s) where breadcrumbs are defined. e.g. | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | - base_path('routes/breadcrumbs.php') | 
					
						
							|  |  |  |     | - glob(base_path('breadcrumbs/*.php')) | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-29 15:01:12 +02:00
										 |  |  |     'files'                                    => base_path('routes/breadcrumbs.php'), | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | Exceptions | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | Determine when to throw an exception. | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException)
 | 
					
						
							| 
									
										
										
										
											2022-03-29 15:01:12 +02:00
										 |  |  |     'unnamed-route-exception'                  => true, | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException)
 | 
					
						
							|  |  |  |     'missing-route-bound-breadcrumb-exception' => true, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException)
 | 
					
						
							| 
									
										
										
										
											2022-03-29 15:01:12 +02:00
										 |  |  |     'invalid-named-breadcrumb-exception'       => true, | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | Classes | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | Subclass the default classes for more advanced customisations. | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Manager
 | 
					
						
							| 
									
										
										
										
											2024-01-17 20:23:02 +01:00
										 |  |  |     'manager-class'                            => Manager::class, | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Generator
 | 
					
						
							| 
									
										
										
										
											2024-01-17 20:23:02 +01:00
										 |  |  |     'generator-class'                          => Generator::class, | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  | ]; |