protected function setSeoMetadata(array $metadata)
    {
        if (is_array($this->seoMetadata)) {
            $this->seoMetadata = new ArrayIterator($this->seoMetadata);
        }

        foreach ($metadata as $key => $value) {
            if (is_array($value)) {
                $value = implode(',', $value);
            }

            $this->seoMetadata[] = [
                'name'    => $key,
                'content' => (string)$value
            ];
        }

        return $this;
    }