Tags::implode

public static Tags::implode($tags)

Implodes an array of tags into a string.

Parameters

array $tags: An array of tags.

Return value

string The imploded string.

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);
}
doc_Drupal
2016-10-29 09:46:16
Comments
Leave a Comment

Please login to continue.