public function getEmbed()
    {
        $owner = $this->owner;
        $title = $owner->EmbedTitle;
        $class = $owner->EmbedClass;
        $type = $owner->EmbedType;
        $template = $this->template;
        $embedHTML = $owner->EmbedHTML;
        $sourceURL = $owner->EmbedSourceURL;
        $templates = [];
        if ($type) {
            $templates[] = $template . '_' . $type;
        }
        $templates[] = $template;
        if (SSViewer::hasTemplate($templates)) {
            return $owner->renderWith($templates);
        }
        switch ($type) {
            case 'video':
            case 'rich':
                $html = HTMLTag::create($embedHTML, 'div');
                break;
            case 'link':
                $html = HTMLTag::create($title, 'a')->setAttribute('href', $sourceURL);
                break;
            case 'photo':
                $html = HTMLTag::create($sourceURL, 'img')->setAttribute([
                    'width' => $this->Width,
                    'height' => $this->Height,
                    'alt' => $title
                ]);
                break;
        }
        return $html->setClass($class);
    }