/** * Add a meta to collection. * * @param string $name * @param string $content * * @return \Arcanedev\SeoHelper\Entities\MetaCollection */ public function add($name, $content) { $meta = Meta::make($name, $content); if ($meta->isValid() && !$this->isIgnored($name)) { $this->put($meta->key(), $meta); } return $this; }
/** * Render the tag. * * @return string */ public function render() { if (!$this->hasContent()) { return ''; } return Meta::make($this->name, $this->get())->render(); }
/** * Make a meta and add it to collection. * * @param string $name * @param string $content * * @return \Arcanedev\SeoHelper\Bases\MetaCollection */ protected function addMeta($name, $content) { $meta = Meta::make($name, $content, $this->nameProperty, $this->prefix); $this->put($meta->key(), $meta); return $this; }