public function DrupalMaskIconMetaTag::getForm in Metatag 7
Build the form for this meta tag.
Return value
array A standard FormAPI array.
Overrides DrupalTextMetaTag::getForm
File
- metatag_favicons/
metatag_favicons.mask-icon.class.inc, line 16 - Custom class for the mask-icon meta tag's custom data.
Class
- DrupalMaskIconMetaTag
- Mask icon meta tag controller.
Code
public function getForm(array $options = array()) {
$form['value'] = array(
'#type' => 'textfield',
'#title' => $this->info['label'],
'#default_value' => isset($this->data['value']) ? $this->data['value'] : '',
'#description' => isset($this->info['description']) ? $this->info['description'] : '',
'#maxlength' => 1024,
'#weight' => $this
->getWeight(),
);
$form['color'] = array(
'#type' => 'textfield',
'#title' => t('Icon: SVG color'),
'#default_value' => isset($this->data['color']) ? $this->data['color'] : '',
'#description' => t('Provides a color for the SVG icon. Per <a href="@specs_url">Apple\'s specifications</a>, it may be a hexadecimal value (e.g. "#990000"), an RGB value (e.g. "rgb(153, 0, 0)"), or a recognized color-keyword (e.g. "red", "lime", "navy", etc). Will only be output if the SVG icon meta tag has a value.', array(
'@specs_url' => 'https://developer.apple.com/library/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_0.html#//apple_ref/doc/uid/TP40014305-CH9-SW20',
)),
'#maxlength' => 10,
'#weight' => $form['value']['#weight'] + 0.01,
);
return $form;
}