You are here

trait SchemaPivotTrait in Schema.org Metatag 8

Schema.org Schema Metatag Manager trait.

Hierarchy

File

src/Plugin/metatag/Tag/SchemaPivotTrait.php, line 8

Namespace

Drupal\schema_metatag\Plugin\metatag\Tag
View source
trait SchemaPivotTrait {

  /**
   * The form element.
   */
  public function pivotForm($value) {
    $form = [
      '#type' => 'select',
      '#title' => 'Pivot',
      '#default_value' => !empty($value['pivot']) ? $value['pivot'] : '',
      '#empty_option' => t('- None -'),
      '#empty_value' => '',
      '#options' => [
        1 => $this
          ->t('Pivot'),
      ],
      '#weight' => -9,
      '#description' => $this
        ->t('Combine and pivot multiple values to display them as multiple objects.'),
    ];
    return $form;
  }

}

Members