protected function ThunderMetaTagTrait::getMetaTagFieldName in Thunder 6.0.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
- 8.2 tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
- 8.3 tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
- 8.4 tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
- 6.2.x tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
- 6.1.x tests/src/FunctionalJavascript/ThunderMetaTagTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderMetaTagTrait::getMetaTagFieldName()
Get field name for meta tag.
Parameters
string $metaTagName: Meta tag name.
string $groupName: Group name where meta tag belongs (fe. basic, advanced, open_graph, ..)
string $fieldNamePrefix: Field name prefix (fe. field_meta_tags[0])
Return value
string Full meta tag field name that can be used to set value for it.
1 call to ThunderMetaTagTrait::getMetaTagFieldName()
- MetaInformationTest::checkSavedConfiguration in tests/
src/ FunctionalJavascript/ MetaInformationTest.php - Check saved configuration on meta tag overview page.
File
- tests/
src/ FunctionalJavascript/ ThunderMetaTagTrait.php, line 25
Class
- ThunderMetaTagTrait
- Trait for manipulation of meta tag configuration and meta tags on page.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function getMetaTagFieldName($metaTagName, $groupName = '', $fieldNamePrefix = '') {
// Based on examples, this way of forming field name works properly.
$fieldName = str_replace([
'.',
':',
], '_', $metaTagName);
if (empty($groupName) && empty($fieldNamePrefix)) {
return $fieldName;
}
return $fieldNamePrefix . '[' . $groupName . '][' . $fieldName . ']';
}