class WebformImageSelectAccess in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_image_select/src/Access/WebformImageSelectAccess.php \Drupal\webform_image_select\Access\WebformImageSelectAccess
Defines the custom access control handler for the webform image select images entity.
Hierarchy
- class \Drupal\webform_image_select\Access\WebformImageSelectAccess
Expanded class hierarchy of WebformImageSelectAccess
File
- modules/
webform_image_select/ src/ Access/ WebformImageSelectAccess.php, line 12
Namespace
Drupal\webform_image_select\AccessView source
class WebformImageSelectAccess {
/**
* Check that webform image select images source can be updated by a user.
*
* @param \Drupal\webform_image_select\WebformImageSelectImagesInterface $webform_image_select_images
* A webform image select image entity.
* @param \Drupal\Core\Session\AccountInterface $account
* Run access checks for this account.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*/
public static function checkImagesSourceAccess(WebformImageSelectImagesInterface $webform_image_select_images, AccountInterface $account) {
return $webform_image_select_images
->access('update', $account, TRUE)
->andIf(AccessResult::allowedIfHasPermission($account, 'edit webform source'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformImageSelectAccess:: |
public static | function | Check that webform image select images source can be updated by a user. |