HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers60/vandeurzenheftrucks.nl/wwwroot/lib/ui/breadcrumb.class.php
<?php
/**
 * Created by PhpStorm.
 * User: mike
 * Date: 19/12/14
 * Time: 14:01
 */

class Breadcrumb
{
    private $_lang;

    public function __construct()
    {
        $Translator = new Translator(URL_LANG);
        $this->_lang = $Translator->get();
    }

    public function create($id, $sub = null)
    {
        $label = $id;
        if (isset($this->_lang[$id])) $label = $this->_lang[$id];

        $url = '';
        if(defined('URL_PAGE')) $url = URL_PAGE;

        $output =  '<span class="holder current" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                      <a href="/' . $url . '" itemprop="url">
                        <span class="double-arrow bc"></span>
                        <span itemprop="title">' . $label . '</span>
                      </a>';
                      if($sub != null)
                      {
                          $output .= ' <span class="double-arrow bc"></span> ';
                          $output .=  '<span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                                      <a href="/' . URL_PAGE . '/' . URL_SUB . '" itemprop="url">
                                        <span itemprop="title">' . $sub . '</span>
                                      </a>';
                          $output .=  '</span>';
                      }
        $output .=  '</span>';

        return $output;
    }
}