og-8.x-1.x-dev/src/OgRoleStorage.php
src/OgRoleStorage.php
<?php
namespace Drupal\og;
use Drupal\Core\Config\Entity\ConfigEntityStorage;
/**
* Controller class for og roles.
*/
class OgRoleStorage extends ConfigEntityStorage implements OgRoleStorageInterface {
/**
* {@inheritdoc}
*/
public function isPermissionInRoles($permission, array $rids): bool {
foreach ($this->loadMultiple($rids) as $role) {
/** @var \Drupal\og\OgRoleInterface $role */
if ($role->hasPermission($permission)) {
return TRUE;
}
}
return FALSE;
}
}
