Files
grzanieplus.pl/plugins/stNavigationPlugin/lib/stNavigationBreadcrumbItem.class.php
2025-03-12 17:06:23 +01:00

88 lines
1.3 KiB
PHP

<?php
/**
* Klasa "okruszka chleba"
*/
class stNavigationBreadcrumbItem
{
/**
* Adres url
*
* @var string
*/
protected $url;
/**
* Tytuł
*
* @var string
*/
protected $title;
/**
* Inicjalizuje pojdyńczy "okruszek chleba"
*
* @param string $name Tytuł linku
* @param string $url Url linku
*/
public function __construct($title, $url = null)
{
$this->title = $title;
$this->url = $url;
}
/**
* Sprawdza czy "okruszek chleba" jest linkiem
*
* @return boolean
*/
public function isLink()
{
return null !== $this->url;
}
/**
* Zwraca adres url linku
*
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* Zwraca tytuł
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Ustawia adres url linku
*
* @param string $url
* @return $this
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* Ustawia tytuł
*
* @param string $title
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
}