/** * Render Title tag * * @return string */ public function render() { if ($this->isEmpty()) { return ''; } $title = []; $this->getFirst($title); $this->renderSeparator($title); if ($this->checkSiteName()) { $this->getLast($title); } $this->tag->setText(implode(' ', $title)); return $this->tag->render(); }
/** * Create a new Tag * * @param string $type * @param array $attributes * * @return Tag */ private static function tag($type = '', $attributes = []) { return Tag::make($type, $attributes); }
/** * Check if Parent Tag has elements * * @return bool */ private function isParentHasElements() { return $this->hasParent() and $this->parent->hasElements(); }