Create an array of meta tags and their values for a show.

@param  object   $show       The show object.
@return array
348036
public static function createMetaTagsForShow($show) {
        return [
            'page_title'             => $show->title . '&verbar;' . Config::get('lasallecmsfrontend.og_site_name'),
            'canonical_url'          => Config('app.url') .'/'. $show->slug,
            'meta_description'       => $show->meta_description,
        ];
    }
1241990
private function getEventTags(Event $event)
    {
        return array_map(function ($value) {
            if (is_bool($value)) {
                $value = $value ? 'true' : 'false';
            }
            return $value;
        }, $event->getTags());
    }
945125
protected function tagMeta()
	{
		// Initialize string
		$html = '';

		// Prevent robots from crawling and indexing the site if not in production mode
		$this->addRobots();

		// Force IE compatibility if option is active
		$this->addIeEdge();

		// Add viewport meta tag for responsive design if option is active
		$this->addResponsive();

		// Add tags for Open Graph if option is active
		$this->addFacebook();

		// Add tags for Twitter Card if option is active
		$this->addTwitter();

		// Add all manually defined meta tags
		foreach ($this->meta as $type => $val)
		{
			foreach ($val as $value => $content)
			{
				// Check if values are defined
				if ($value && $content)
				{
					// Link to a public file
					if (File::isFile(public_path($content)))
					{
						$content = asset($content);
					}

					// Return tag for each registered meta
					$html .= '<meta '.$type.'="'.$value.'" content="'.$content.'">' . "\n\t";
				}
			}
		}

		// Return complete string
		return $html;
	}
584694
public function buildAttributes($array)
    {
        $output = array();

        if($array instanceof ObjectConfig) {
            $array = ObjectConfig::unbox($array);
        }

        if(is_array($array))
        {
            foreach($array as $key => $item)
            {
                if(is_array($item))
                {
                    if(empty($item)) {
                        continue;
                    }

                    $item = implode(' ', $item);
                }

                if (is_bool($item))
                {
                    if ($item === false) continue;
                    $item = $key;
                }

                $output[] = $key.'="'.str_replace('"', '&quot;', $item).'"';
            }
        }

        return implode(' ', $output);
    }
1016762
public function setRequireExistingPassword($show)
    {
        // Don't modify if already added / removed
        if ((bool)$show === $this->requireExistingPassword) {
            return $this;
        }
        $this->requireExistingPassword = $show;
        $name = $this->getName();
        $currentName = "{$name}[_CurrentPassword]";
        if ($show) {
            $confirmField = PasswordField::create($currentName, _t('SilverStripe\\Security\\Member.CURRENT_PASSWORD', 'Current Password'));
            $this->getChildren()->unshift($confirmField);
        } else {
            $this->getChildren()->removeByName($currentName, true);
        }
        return $this;
    }
174317
public static function validateMeta(array &$array)
    {

        foreach ($array as $key => $tag) {
            if (!($tag instanceof Meta)) {
                $newtag = new Meta($tag);
                $array[$key] = $newtag;
            }
        }
    }
276318
public function getMetaMarkup()
    {
        $html = "";

        foreach ($this->getMeta() as $name => $content)
        {
            if(is_array($content)) {
                foreach($content as $cont)
                    $html .= "<meta name=\"{$name}\" content=\"{$cont}\">\n";
            } else {
                $html .= "<meta name=\"{$name}\" content=\"{$content}\">\n";
            }
        }

        return $html;
    }
342146
public function MetaTags($includeTitle = true)
    {
        $tags = [];
        $owner = $this->getOwner();

        if ($includeTitle && strtolower($includeTitle) != 'false') {
            $tags[] = HTML::createTag(
                'title',
                [],
                $owner->obj('Title')->forTemplate()
            );
        }

        $generator = trim(Config::inst()->get(self::class, 'meta_generator'));
        if (!empty($generator)) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'generator',
                'content' => $generator,
            ));
        }

        $charset = ContentNegotiator::config()->uninherited('encoding');
        $tags[] = HTML::createTag('meta', array(
            'http-equiv' => 'Content-Type',
            'content' => 'text/html; charset=' . $charset,
        ));
        if ($owner->MetaDescription) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'description',
                'content' => $owner->MetaDescription,
            ));
        }

        if (Permission::check('CMS_ACCESS_CMSMain') && $owner->exists()) {
            $tags[] = HTML::createTag(
                'meta',
                [
                    'name' => 'x-page-id',
                    'content' => $owner->obj('ID')->forTemplate()
                ]
            );
            $tags[] = HTML::createTag(
                'meta',
                [
                    'name' => 'x-cms-edit-link',
                    'content' => $owner->obj('CMSEditLink')->forTemplate()
                ]
            );
        }

        $tags = implode("\n", $tags);
        if ($owner->ExtraMeta) {
            $tags .= $owner->obj('ExtraMeta')->forTemplate();
        }

        $owner->extend('updateMetaTags', $tags);

        return $tags;
    }
657923
public static function createMetaTagsForEpisode($episode) {
        return [
            'page_title'             => $episode->title . '&verbar;' . Config::get('lasallecmsfrontend.og_site_name'),
            'canonical_url'          => $episode->canonical_url,
            'meta_description'       => $episode->meta_description,
        ];
    }
497533
public function MetaTags(&$tags)
    {
        if ($code = GoogleAPI::singleton()->getVerificationCode()) {
            
            // Add New Line (if does not exist):
            
            if (!preg_match('/[\n]$/', $tags)) {
                $tags .= "\n";
            }
            
            // Add Verification Code Meta Tag:
            
            $tags .= sprintf(
                "<meta name=\"%s\" content=\"%s\" />\n",
                self::VERIFICATION_TAG_NAME,
                Convert::raw2att($code)
            );
            
        }
    }
805009
public function metaKeywords()
    {
        $metaKeywords = $this->getMetaKeywords();

        if (!$metaKeywords && $type = $this->getType()) {
            $metaKeywords = $type->getMetaKeywords();
        }

        if (!$metaKeywords) {
            $metaKeywords = $this->getTags();
        }

        return $metaKeywords;
    }
1366887
protected function _collectTags($object)
    {
        // Clear category cache for new products
        if ($this->_isForUpdate && !$object->getId()) {
            $result = array();
            foreach ($object->getCategoryIds() as $categoryId) {
                $result[] = EcomDev_Varnish_Model_Processor_Category::TAG_PREFIX . $categoryId;
            }
            return $result;
        }
        
        return self::TAG_PREFIX . $object->getId();
    }
96342
public function tags(array $keys = [])
    {
        $html = '';

        foreach (($keys ?: array_keys($this->metas)) as $key) {
            $html .= $this->tag($key);
        }

        return $html;
    }
932777
protected function _collectTags($object)
    {
        if ($object instanceof Mage_Cms_Model_Block) {
            return self::TAG_PREFIX . $object->getIdentifier();
        }
        return self::TAG_PREFIX . $object->getId();
    }
808756
public function MetaTags($includeTitle = true)
    {
        $tags = array();

        if ($includeTitle && strtolower($includeTitle) != 'false') {
            $title = $this->owner->MetaTitle
                ? $this->owner->MetaTitle
                : $this->owner->Title;
            $tags[] = HTML::createTag('title', array(), $title);
        }
        $generator = trim(Config::inst()->get(SiteTree::class, 'meta_generator'));
        if (!empty($generator)) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'generator',
                'content' => $generator,
            ));
        }

        $charset = ContentNegotiator::config()->uninherited('encoding');
        $tags[] = HTML::createTag('meta', array(
            'http-equiv' => 'Content-Type',
            'content' => 'text/html; charset=' . $charset,
        ));

        if ($this->owner->MetaDescription) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'description',
                'content' => $this->owner->MetaDescription,
            ));
        }

        $this->owner->extend('updateMetaTagsArray', $tags);
        $tagString = implode("\n", $tags);
        $this->owner->extend('updateMetaTags', $tagString);

        return DBField::create_field('HTMLFragment', $tagString);
    }
1164201
public static function get_all_post_meta( $post ) {
		$tags = [
			[ 'name' => 'description',			'content' => self::get_post_meta_description( $post ) ],
			[ 'property' => 'og:locale',		'content' => get_locale() ],
			[ 'property' => 'og:type',			'content' => 'article' ],
			[ 'property' => 'og:title',			'content' => self::get_post_og_title( $post ) ],
			[ 'property' => 'og:description',	'content' => self::get_post_og_description( $post ) ],
			[ 'property' => 'og:url',			'content' => get_permalink( $post->ID ) ],
			[ 'property' => 'og:site_name',		'content' => get_bloginfo( 'title' ) ],
			[ 'property' => 'og:updated_time',	'content' => get_post_modified_time( 'c', true, $post ) ],
			[ 'name' => 'twitter:card',			'content' => self::get_twitter_card_type() ],
			[ 'name' => 'twitter:title',		'content' => self::get_post_twitter_title( $post ) ],
			[ 'name' => 'twitter:description',	'content' => self::get_post_twitter_description( $post ) ],
		];

		$og_image = self::get_post_og_image( $post );
		$twitter_image = self::get_post_twitter_image( $post );

		if ( ! empty( $og_image ) ) {
			$og_image_size = getimagesize( $og_image );

			$tags = array_merge( $tags, [
				[ 'property' => 'og:image',			'content' => $og_image ],
				[ 'property' => 'og:image:width',	'content' => $og_image_size[0] ],
				[ 'property' => 'og:image:height',	'content' => $og_image_size[1] ],
			] );
		}

		if ( ! empty( $twitter_image ) ) {
			$twitter_image_size = getimagesize( $twitter_image );

			$tags = array_merge( $tags, [
				[ 'name' => 'twitter:image',		'content' => $twitter_image ],
				[ 'name' => 'twitter:image:width',	'content' => $twitter_image_size[0] ],
				[ 'name' => 'twitter:image:height',	'content' => $twitter_image_size[1] ],
			] );
		}

		$tags = array_merge( $tags, Site::webmaster_tools() );

		return [
			'title' => self::get_post_meta_title( $post ),
			'tags' => $tags,
		];
	}
1363812
public static function createTwitterTagsForEpisode($episode, $show) {
        return [
            'twitter:card'        => Config::get('lasallecmsfrontend.twitter_card'),
            'twitter:site'        => Config::get('lasallecmsfrontend.twitter_site'),
            'twitter:title'       => $episode->title,
            'twitter:description' => $episode->meta_description,
            'twitter:creator'     => Config::get('lasallecmsfrontend.twitter_creator'),
            //'twitter:image:src'   => self::determineEpisodeImagePath($episode, $show),
            'twitter:image'       => self::determineEpisodeImagePath($episode, $show),
        ];
    }