public function View::isHidden in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/View.php \Drupal\webform\Plugin\WebformElement\View::isHidden()
Checks if the element is hidden.
Return value
bool TRUE if the element is hidden.
Overrides WebformElementBase::isHidden
1 call to View::isHidden()
- View::form in src/
Plugin/ WebformElement/ View.php - Gets the actual configuration webform array to be built.
File
- src/
Plugin/ WebformElement/ View.php, line 40
Class
- View
- Provides a hidden 'view' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function isHidden() {
// Only users who can 'Administer views' or 'Edit webform source code''
// can add the 'View' element.
return !$this->currentUser
->hasPermission('edit webform source') && !$this->currentUser
->hasPermission('administer views');
}