src/Security/InheritedPermissions.php
public function prePopulatePermissionCache($permission = 'edit', $ids = [])
    {
        switch ($permission) {
            case self::EDIT:
                $this->canEditMultiple($ids, Security::getCurrentUser(), false);
                break;
            case self::VIEW:
                $this->canViewMultiple($ids, Security::getCurrentUser(), false);
                break;
            case self::DELETE:
                $this->canDeleteMultiple($ids, Security::getCurrentUser(), false);
                break;
            default:
                throw new InvalidArgumentException("Invalid permission type $permission");
        }
    }
public function prePopulatePermissionCache($permission = 'edit', $ids = [])
    {
        switch ($permission) {
            case self::EDIT:
                $this->canEditMultiple($ids, Security::getCurrentUser(), false);
                break;
            case self::VIEW:
                $this->canViewMultiple($ids, Security::getCurrentUser(), false);
                break;
            case self::DELETE:
                $this->canDeleteMultiple($ids, Security::getCurrentUser(), false);
                break;
            default:
                throw new InvalidArgumentException("Invalid permission type $permission");
        }
    }
public function prePopulatePermissionCache ( $ permission = 'edit' , $ ids = [ ] ) { switch ( $ permission ) { case self :: EDIT : $ this -> canEditMultiple ( $ ids , Security :: getCurrentUser ( ) , false ) ; break ; case self :: VIEW : $ this -> canViewMultiple ( $ ids , Security :: getCurrentUser ( ) , false ) ; break ; case self :: DELETE : $ this -> canDeleteMultiple ( $ ids , Security :: getCurrentUser ( ) , false ) ; break ; default : throw new InvalidArgumentException ( "Invalid permission type $permission" ) ; } }
Force pre-calculation of a list of permissions for optimisation

@param string $permission
@param array $ids
Force pre - calculation of a list of permissions for optimisation