You are here

public function SchemaPivotTrait::pivotForm in Schema.org Metatag 8

The form element.

12 calls to SchemaPivotTrait::pivotForm()
SchemaAddressTrait::postalAddressForm in src/Plugin/metatag/Tag/SchemaAddressTrait.php
The form element.
SchemaContactPointTrait::contactPointForm in src/Plugin/metatag/Tag/SchemaContactPointTrait.php
Form element.
SchemaCountryTrait::countryForm in src/Plugin/metatag/Tag/SchemaCountryTrait.php
The form element.
SchemaEntryPointTrait::entryPointForm in src/Plugin/metatag/Tag/SchemaEntryPointTrait.php
The form element.
SchemaGeoTrait::geoForm in src/Plugin/metatag/Tag/SchemaGeoTrait.php
The form element.

... See full list

File

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

Class

SchemaPivotTrait
Schema.org Schema Metatag Manager trait.

Namespace

Drupal\schema_metatag\Plugin\metatag\Tag

Code

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;
}