public function TagSet::hasTag in Extensible BBCode 8.3
Same name and namespace in other branches
- 4.0.x src/Entity/TagSet.php \Drupal\xbbcode\Entity\TagSet::hasTag()
Check if a particular tag plugin is active.
Parameters
string $plugin_id: Plugin ID.
Return value
bool TRUE if the plugin is active in this tag set.
Overrides TagSetInterface::hasTag
File
- src/
Entity/ TagSet.php, line 90
Class
- TagSet
- Represents a set of configured tags.
Namespace
Drupal\xbbcode\EntityCode
public function hasTag($plugin_id) : bool {
foreach ($this->tags as $tag) {
if ($tag['id'] === $plugin_id) {
return TRUE;
}
}
return FALSE;
}