Пример #1
0
 /**
  * Render meta tag
  *
  * @param  string $name
  * @param  string $content
  * @param  array  $attributes
  *
  * @return string
  */
 protected function renderMetaTag($name, $content, array $attributes = [])
 {
     if ($this->isEmpty()) {
         return '';
     }
     return Markup::meta('name', $name, $content, $attributes)->render();
 }
Пример #2
0
 /**
  * @return string
  */
 public function render()
 {
     if ($this->isEmpty()) {
         return '';
     }
     return Markup::meta('name', $this->name, $this->content)->render();
 }
Пример #3
0
 /**
  * @return array
  */
 public function toArray()
 {
     if ($this->isEmpty()) {
         return [];
     }
     $tags = [];
     // Check if .ico file exists
     //if ($this->isFaviconExists('ico')) {
     $tags[] = ['href' => $this->getIconPath(), 'rel' => 'icon', 'type' => 'image/x-icon'];
     //}
     // Check if .png file exists
     // if ($this->isFaviconExists('png')) {
     $tags[] = ['href' => $this->getImagePath(), 'rel' => 'icon', 'type' => 'image/png'];
     // }
     $tags = array_map(function ($attributes) {
         return Markup::make('link', $attributes)->render();
     }, $tags);
     return array_filter($tags);
 }
Пример #4
0
 public function __construct($title = '', $siteName = '')
 {
     $this->title = $title;
     $this->siteName = $siteName;
     $this->tag = Markup::title();
 }