protected function MappingSteps::filterMetatags in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/Form/MappingEditSteps/MappingSteps.php \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingSteps::filterMetatags()
Return only supported metatag fields.
Parameters
object $gathercontent_field: Object of field from GatherContent.
Return value
array Array of supported metatag fields.
2 calls to MappingSteps::filterMetatags()
- MappingStepEdit::getForm in gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingStepEdit.php - Returns form array.
- MappingStepNew::getForm in gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingStepNew.php - Returns form array.
File
- gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingSteps.php, line 507
Class
- MappingSteps
- Class MappingSteps.
Namespace
Drupal\gathercontent_ui\Form\MappingEditStepsCode
protected function filterMetatags($gathercontent_field) {
if ($gathercontent_field->type === 'text' && isset($gathercontent_field->plainText) && $gathercontent_field->plainText) {
return [
'title' => t('Title'),
'description' => t('Description'),
'abstract' => t('Abstract'),
'keywords' => t('Keywords'),
];
}
else {
return [];
}
}