Beispiel #1
0
 /**
  * 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();
 }
Beispiel #2
0
 /**
  * Create a new Tag
  *
  * @param string $type
  * @param array  $attributes
  *
  * @return Tag
  */
 private static function tag($type = '', $attributes = [])
 {
     return Tag::make($type, $attributes);
 }
Beispiel #3
0
 /**
  * Check if Parent Tag has elements
  *
  * @return bool
  */
 private function isParentHasElements()
 {
     return $this->hasParent() and $this->parent->hasElements();
 }