public function Webform::hasVariant in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::hasVariant()
Determine if a specific webform variant exists.
Parameters
string $variant_id: The webform variant ID.
Return value
bool TRUE if a specific webform variant exists.
Overrides WebformInterface::hasVariant
File
- src/
Entity/ Webform.php, line 2824
Class
- Webform
- Defines the webform entity.
Namespace
Drupal\webform\EntityCode
public function hasVariant($variant_id) {
return $this
->getVariants()
->has($variant_id);
}