public function ShortcodeService::isValidShortcodeTag in Shortcode 2.0.x
Same name and namespace in other branches
- 8 src/ShortcodeService.php \Drupal\shortcode\ShortcodeService::isValidShortcodeTag()
Checking the given tag is valid ShortCode tag or not.
Parameters
string $tag: The tag name.
Return value
bool Returns TRUE if the given $tag is valid ShortCode tag.
1 call to ShortcodeService::isValidShortcodeTag()
- ShortcodeService::process in src/
ShortcodeService.php - Processes the Shortcodes according to the text and the text format.
File
- src/
ShortcodeService.php, line 179
Class
- ShortcodeService
- Provide the ShortCode service.
Namespace
Drupal\shortcodeCode
public function isValidShortcodeTag($tag) {
$tokens = $this
->getShortcodePluginTokens();
// TODO: This is case-sensitive right now, consider if it should be.
return isset($tokens[$tag]);
}