url = $url; $this->title = $title; $this->description = $description; $this->icon = $icon; } /** * @return Url */ public function getUrl() { return $this->url; } /** * @return string */ public function getTitle() { return $this->title; } /** * @return string */ public function getDescription() { return $this->description; } /** * @return string */ public function getIcon() { return $this->icon; } /** * Render our icon * * @param View $view * @return string */ protected function renderIcon(View $view) { return $view->icon($this->getIcon()); } /** * @param View $view * @return string */ public function render(View $view) { return sprintf( '%s%s

%s

', $this->getUrl(), $this->renderIcon($view), $view->escape($this->getTitle()), $view->escape($this->getDescription()) ); } }