mambax7 /
xdonations
| 1 | <?php namespace XoopsModules\Xdonations\Common; |
||
| 2 | |||
| 3 | /* |
||
| 4 | You may not change or alter any portion of this comment or credits |
||
| 5 | of supporting developers from this source code or any supporting source code |
||
| 6 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
| 7 | |||
| 8 | This program is distributed in the hope that it will be useful, |
||
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
| 11 | */ |
||
| 12 | /** |
||
| 13 | * Breadcrumb Class |
||
| 14 | * |
||
| 15 | * @copyright XOOPS Project (https://xoops.org) |
||
| 16 | * @license http://www.fsf.org/copyleft/gpl.html GNU public license |
||
| 17 | * @author lucio <[email protected]> |
||
| 18 | * @package xdonations |
||
| 19 | * |
||
| 20 | * Example: |
||
| 21 | * $breadcrumb = new PedigreeBreadcrumb(); |
||
| 22 | * $breadcrumb->addLink( 'bread 1', 'index1.php' ); |
||
| 23 | * $breadcrumb->addLink( 'bread 2', '' ); |
||
| 24 | * $breadcrumb->addLink( 'bread 3', 'index3.php' ); |
||
| 25 | * echo $breadcrumb->render(); |
||
| 26 | */ |
||
| 27 | defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Class Breadcrumb |
||
| 31 | */ |
||
| 32 | class Breadcrumb |
||
| 33 | { |
||
| 34 | public $dirname; |
||
| 35 | private $bread = []; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * |
||
| 39 | */ |
||
| 40 | public function __construct() |
||
| 41 | { |
||
| 42 | $this->dirname = basename(dirname(dirname(__DIR__))); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Add link to breadcrumb |
||
| 47 | * |
||
| 48 | * @param string $title |
||
| 49 | * @param string $link |
||
| 50 | */ |
||
| 51 | public function addLink($title = '', $link = '') |
||
| 52 | { |
||
| 53 | $this->bread[] = [ |
||
| 54 | 'link' => $link, |
||
| 55 | 'title' => $title |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Render Pedigree BreadCrumb |
||
| 61 | * |
||
| 62 | */ |
||
| 63 | public function render() |
||
| 64 | { |
||
| 65 | if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { |
||
| 66 | require_once $GLOBALS['xoops']->path('class/theme.php'); |
||
| 67 | $GLOBALS['xoTheme'] = new \xos_opal_Theme(); |
||
|
0 ignored issues
–
show
|
|||
| 68 | } |
||
| 69 | |||
| 70 | require_once $GLOBALS['xoops']->path('class/template.php'); |
||
| 71 | $breadcrumbTpl = new \XoopsTpl(); |
||
|
0 ignored issues
–
show
The type
XoopsTpl was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 72 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
||
| 73 | $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
||
| 74 | unset($breadcrumbTpl); |
||
| 75 | |||
| 76 | return $html; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths