Render a youtube object tag.

@param Garp_Db_Table_Row|string $youtube A record from the `youtube_videos` table,
or a url to a YouTube video.
@param array $options Various rendering options
@return string
492829
public function render($youtube, array $options = array()) {
        $this->_setDefaultAttribs($options);

        $_attribs = $options['attribs'];
        $_attribs['width'] = $options['width'];
        $_attribs['height'] = $options['height'];
        $_attribs['frameborder'] = '0';
        $_attribs['allowfullscreen'] = 'allowfullscreen';

        // unset the parameters that are not part of the query string
        unset($options['width']);
        unset($options['height']);
        unset($options['attribs']);

        // create the YouTube URL
        $youtubeUrl = $this->getPlayerUrl($youtube, $options);
        $_attribs['src'] = $youtubeUrl;

        $html = '<iframe' . $this->_htmlAttribs($_attribs) . '></iframe>';
        return $html;
    }
1279574
public function renderSlideShow($slideShowOrTag, array $options = [])
    {
        if (is_string($slideShowOrTag)) {
            $slideShowOrTag = $this->repository->findOneBy(['tag' => $slideShowOrTag]);
        }
        if (!$slideShowOrTag instanceof SlideShow) {
            throw new \InvalidArgumentException("Expected tag or instance of " . SlideShow::class);
        }

        return $this->renderer->render($slideShowOrTag, $options);
    }
934614
public function render(TableView $table, array $options = [])
    {
        $options = array_merge($this->defaults, $options);

        $template = $options['template'];
        if ($template instanceof \Twig_TemplateWrapper) {
            $this->template = $template;
        } else {
            $this->template = $this->environment->load($template);
        }

        return $this->template->renderBlock('table', ['table' => $table, 'options' => $options]);
    }
1329070
public function render($options = array())
    {
        $string = $options['string'];
        $data = $options['data'];

        return $this->renderTpl($string, $data);
    }
1057450
public function renderCloseButton($options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $this->getId() . '-close-button';
        }

        $this->getView()->registerJs('
        jQuery("#' . $options['id'] . '").on("click", function(event) {
            jQuery("#' . $this->getId() . '").fadeOut();
        });
        ');

        return Elements::icon('close', $options);
    }
2236
public static function get($options = array())
    {
        if (!isset(self::$_instances[md5(serialize($options))])) {
            return new HTML($options);
        }

        return self::$_instances[md5(serialize($options))];
    }
464612
public function render(Request $request, array $options = array())
    {
        $provider = isset($options['provider']) ? $this->getProvider($options['provider']) : $this->getDefaultProvider();
        unset($options['provider']);

        return $provider->render($request, $options);
    }
1343398
public function display($content, $options = [])
    {
        if (!empty($options['meta']) || !empty($options['pageBuilder'])) {
            $content = preg_replace_callback(
                '/{{\s*\$(?P<block>\w*)\s*}}/',
                function ($matches) {
                    return str_replace('"', "'", strip_tags(PageBuilder::block($matches['block'])));
                },
                $content
            );
            $content = str_replace('%page_name%', PageBuilder::pageName(), $content);
            $content = str_replace('%site_name%', config('coaster::site.name'), $content);
        }
        if (!empty($options['meta'])) {
            $content = trim(str_replace(PHP_EOL, ' ', $content));
            $content = preg_replace('/\s+/', ' ', $content);
            $content = htmlentities(strip_tags(html_entity_decode($content, ENT_QUOTES, 'UTF-8')));
            $content = StringHelper::cutString($content);
        }
        return parent::display($content, $options);
    }
1145036
public function render(Request $request, array $options = array())
    {
        return $this->doRender(
            $options + array(
                'shortname' => $this->shortName,
                'identifier' => $request->getPathInfo(),
                'count' => $this->count,
            )
        );
    }
1143332
public function render(array $options = array())
    {
        if (!empty($options['providers'])) {
            $outputProviders = array();
            foreach ($options['providers'] as $provider) {
                $outputProviders[] = $this->getProvider($provider);
            }
        } else {
            $outputProviders = $this->getDefaultProviders();
        }

        unset($options['providers']);

        $renderedProviders = array();
        foreach ($outputProviders as $label => $provider) {
            $provider->setTemplateEngine($this->templateEngine);
            $provider->setTemplateName($options['template']);
            $provider->setLabel($label);
            $renderedProviders[$label] = $provider->render($options);
        }

        return $renderedProviders;
    }
430577
public function sql(array $options, array & $cache_tags = null) : string {
		$options['return_query_only'] = 'wrap';
		$result = $this->get($options);
		if (isset($cache_tags)) {
			$cache_tags = array_merge($cache_tags, $result['cache_tags']);
		}
		return $result['sql'];
	}
1047923
public function renderMedia($mediaId, array $options = array())
    {
        $media = $this->getMedia($mediaId);

        if ($media) {
            return $this->displayMediaManager->renderMedia($media, $options);
        }

        return '';
    }
1043367
public function render(array $options, $name, $selected = array(), array $attrs = array(), $tpl = false)
    {
        if (is_array($selected)) {
            $last = Arr::last($selected);
            $selectedVal = Arr::in($last, $selected) ? $last : null;
            list($options, $selected) = $this->_checkSelected($options, $selectedVal);
        }

        if (is_string($selected)) {
            list($options, $selected) = $this->_checkSelected($options, $selected);
        }

        return parent::render($options, $name, $selected, $attrs, $tpl);
    }
421978
public function renderName($table, string $field, array $options = []) : string
    {
        $handler = self::getByTableField($table, $field, $options, $this->cakeView);

        return $handler->renderName();
    }
956115
public function renderValue($data, array $options = []) : string
    {
        $options = array_merge($this->defaultOptions, $this->fixOptions($options));
        $result = $this->getFieldValueFromData($data, $options);

        // Currently needed for blobs from the database, but might be handy later
        // for network data and such.
        // TODO: Add support for encoding (base64, et) via $options
        if (is_resource($result)) {
            $result = stream_get_contents($result);
        }

        $rendererClass = $this->config->getProvider('renderValue');
        if (!empty($options['renderAs'])) {
            $rendererClass = __NAMESPACE__ . '\\Provider\\RenderValue\\' . ucfirst($options['renderAs']) . 'Renderer';
        }

        if (!class_exists($rendererClass)) {
            throw new InvalidArgumentException("Renderer class [$rendererClass] does not exist");
        }

        $rendererClass = new $rendererClass($this->config);
        $result = (string)$rendererClass->provide($result, $options);

        return $result;
    }
321831
private function getRenderer(array $options)
    {
        if ($options['text']) {
            if ($options['badge']) {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="label label-%s"><i class="fa fa-%s"></i> %s</span>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            } else {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="text-%s"><i class="fa fa-%s"></i> %s</span>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            }
        } else {
            if ($options['badge']) {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="label label-%s" title="%s"><i class="fa fa-%s"></i></span>',
                        $tag->getTheme(), $tag->getName(), $tag->getIcon()
                    );
                };
            } else {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<i class="text-%s fa fa-%s" title="%s"></i>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            }
        }
    }
1152937
public function render($options = [ ])
    {
        $mergedOptions = array_merge($this->config['options'], $options);

        $data = [
            'public_key' => value($this->config['public_key']),
            'options'    => $mergedOptions,
            'dataParams' => $this->extractDataParams($mergedOptions),
        ];

        if (array_key_exists('lang', $mergedOptions) && "" !== trim($mergedOptions['lang'])) {
            $data['lang'] = $mergedOptions['lang'];
        }

        $view = $this->getView($options);

        return app('view')->make($view, $data);
    }