public function PropertyTypeBase::pivotForm in Schema.org Metatag 8.2
Pivot form element.
Parameters
int $value: The current value for the pivot form.
Return value
array A form array.
Overrides PropertyTypeInterface::pivotForm
1 call to PropertyTypeBase::pivotForm()
- PropertyTypeBase::form in src/
Plugin/ schema_metatag/ PropertyTypeBase.php - Create a complete form element for this property type.
File
- src/
Plugin/ schema_metatag/ PropertyTypeBase.php, line 261
Class
- PropertyTypeBase
- Base class for Property type plugins.
Namespace
Drupal\schema_metatag\Plugin\schema_metatagCode
public function pivotForm($value) {
$form = [
'#type' => 'select',
'#title' => 'Pivot',
'#default_value' => $value,
'#empty_option' => ' - ' . $this
->t('None') . ' - ',
'#empty_value' => '',
'#options' => [
1 => $this
->t('Pivot'),
],
'#description' => $this
->t('Combine and pivot multiple values to display them as multiple objects.'),
];
return $form;
}