function userprotect_rule_load in User protect 8
Loads a ProtectionRule object.
Parameters
string $name: The ID of the ProtectionRule object to load.
Return value
Drupal\userprotect\Entity\ProtectionRuleInterface An instance of an userprotect_rule entity.
File
- ./
userprotect.module, line 24 - Allows admins to protect users from being edited or cancelled.
Code
function userprotect_rule_load($name) {
return \Drupal::entityTypeManager()
->getStorage('userprotect_rule')
->load($name);
}