8.5.x Tags.php Tags::implode($tags)
8.0.x Tags.php Tags::implode($tags)
8.1.x Tags.php Tags::implode($tags)
8.2.x Tags.php Tags::implode($tags)
8.3.x Tags.php Tags::implode($tags)
8.4.x Tags.php Tags::implode($tags)
8.6.x Tags.php Tags::implode($tags)

Implodes an array of tags into a string.

Parameters

array $tags: An array of tags.

Return value

string The imploded string.

4 calls to Tags::implode()
TagsTest::testImplodeTags in core/tests/Drupal/Tests/Core/Common/TagsTest.php
Implodes a series of tags.
TermTest::testNodeTermCreationAndDeletion in core/modules/taxonomy/src/Tests/TermTest.php
Test term creation with a free-tagging vocabulary from the node form.
UnpublishByKeywordComment::buildConfigurationForm in core/modules/comment/src/Plugin/Action/UnpublishByKeywordComment.php
Form constructor.
UnpublishByKeywordNode::buildConfigurationForm in core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
Form constructor.

File

core/lib/Drupal/Component/Utility/Tags.php, line 67

Class

Tags
Defines a class that can explode and implode tags.

Namespace

Drupal\Component\Utility

Code

public static function implode($tags) {
  $encoded_tags = array();
  foreach ($tags as $tag) {
    $encoded_tags[] = self::encode($tag);
  }
  return implode(', ', $encoded_tags);
}