public function SchemaPivotTrait::pivotForm in Schema.org Metatag 7
The form element.
12 calls to SchemaPivotTrait::pivotForm()
- SchemaAddressTrait::postalAddressForm in src/
SchemaAddressTrait.php - The form element.
- SchemaContactPointTrait::contactPointForm in src/
SchemaContactPointTrait.php - Form element.
- SchemaCountryTrait::countryForm in src/
SchemaCountryTrait.php - The form element.
- SchemaEntryPointTrait::entryPointForm in src/
SchemaEntryPointTrait.php - The form element.
- SchemaGeoTrait::geoForm in src/
SchemaGeoTrait.php - The form element.
File
- src/
SchemaPivotTrait.php, line 11
Class
- SchemaPivotTrait
- Schema.org Schema Metatag Manager trait.
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;
}