You are here

function handy_cache_tags_get_tag in Handy cache tags 8

Create a tag from a string.

Parameters

string $type: The suffix, so to speak.

Deprecated

in handy_cache_tags:8.x-1.0-beta1 and is removed from handy_cache_tags:2.0.0. Try to not use this, since its procedural. Use \Drupal::service('handy_cache_tags.manager')->getTag() instead.

See also

https://www.drupal.org/project/handy_cache_tags/issues/2939178

1 call to handy_cache_tags_get_tag()
TagNamesTest::testProcedural in tests/src/Unit/TagNamesTest.php
Tests procedural with no mocking.

File

./handy_cache_tags.module, line 88
The module file for handy cache tags.

Code

function handy_cache_tags_get_tag($type) {

  /** @var \Drupal\handy_cache_tags\HandyCacheTagsManager $manager */
  $manager = \Drupal::service('handy_cache_tags.manager');
  return $manager
    ->getTag($type);
}