PHP code example of sasule / breadcrumb
1. Go to this page and download the library: Download sasule/breadcrumb library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sasule / breadcrumb example snippets
/**
* @var Sasule\Breadcrumb\Breadcrumb
*/
private $breadcrumb;
/**
* @param Sasule\Breadcrumb\Breadcrumb $breadcrumb
*/
public function injectBreadcrumb(Sasule\Breadcrumb\Breadcrumb $breadcrumb)
{
$this->breadcrumb = $breadcrumb;
}
...
/**
* @return Sasule\Breadcrumb\Breadcrumb
*/
protected function createComponentBreadcrumb()
{
$bc = $this->breadcrumb;
//$bc->addLink('Domů', ':Default:Homepage:default'); //You can add default links so this will be shown everytime (if uncommented).
return $bc;
}