You are here

private function MetatagTagsTestBase::getMethodFromTagCallback in Metatag 8

Convert a tag name with a callback to a lowerCamelCase method name.

Parameters

string $tag_name: The meta tag name.

string $callback: The callback that is to be used.

Return value

string The tag name and callback concatenated together and converted to lowerCamelCase.

2 calls to MetatagTagsTestBase::getMethodFromTagCallback()
MetatagTagsTestBase::testTagsArePresent in tests/src/Functional/MetatagTagsTestBase.php
Tests that this module's tags are available.
MetatagTagsTestBase::testTagsInputOutput in tests/src/Functional/MetatagTagsTestBase.php
Confirm that each tag can be saved and that the output is correct.

File

tests/src/Functional/MetatagTagsTestBase.php, line 352

Class

MetatagTagsTestBase
Base class to test all of the meta tags that are in a specific module.

Namespace

Drupal\Tests\metatag\Functional

Code

private function getMethodFromTagCallback($tag_name, $callback) {
  return lcfirst(Container::camelize($tag_name . '_' . $callback));
}