You are here

public function DrupalMaskIconMetaTag::getValue in Metatag 7

Get the string value of this meta tag.

Return value

string The value of this meta tag.

Overrides DrupalTextMetaTag::getValue

1 call to DrupalMaskIconMetaTag::getValue()
DrupalMaskIconMetaTag::getElement in metatag_favicons/metatag_favicons.mask-icon.class.inc
Get the HTML tag for this meta tag.

File

metatag_favicons/metatag_favicons.mask-icon.class.inc, line 40
Custom class for the mask-icon meta tag's custom data.

Class

DrupalMaskIconMetaTag
Mask icon meta tag controller.

Code

public function getValue(array $options = array()) {
  $value = array(
    'value' => '',
    'color' => NULL,
  );

  // The 'color' attribute will only be output if the 'value' is present.
  if (!empty($this->data['value'])) {

    // Pass the 'value' through the parent logic.
    $value['value'] = parent::getValue($options);

    // Get the optional 'color' attribute.
    if (!empty($this->data['color'])) {
      $value['color'] = check_plain($this
        ->tidyValue($this->data['color']));
    }
  }
  return $value;
}