3 namespace Drupal\metatag_pinterest\Plugin\metatag\Tag;
5 use Drupal\metatag\Plugin\metatag\Tag\MetaNameBase;
8 * The Pinterest "nopin" meta tag.
11 * id = "pinterest_nopin",
12 * label = @Translation("No pin"),
13 * description = @Translation("Do not pin anything from this page. When selected, this option will take precedence over all options below."),
15 * group = "pinterest",
22 class PinterestNopin extends MetaNameBase {
27 public function form(array $element = []) {
29 '#type' => 'checkbox',
30 '#title' => $this->label(),
31 '#description' => $this->description(),
32 '#default_value' => ($this->value === 'nopin') ?: '',
33 '#required' => isset($element['#required']) ? $element['#required'] : FALSE,
34 '#element_validate' => [[get_class($this), 'validateTag']],
35 '#return_value' => 'nopin',