private function getPoliciesById(RoleDraft $roleDraft)
    {
        $policies = [];
        foreach ($roleDraft->getPolicies() as $policy) {
            $policies[$policy->id] = $policy;
        }

        return $policies;
    }
private function getPoliciesById(RoleDraft $roleDraft)
    {
        $policies = [];
        foreach ($roleDraft->getPolicies() as $policy) {
            $policies[$policy->id] = $policy;
        }

        return $policies;
    }
private function getPoliciesById ( RoleDraft $ roleDraft ) { $ policies = [ ] ; foreach ( $ roleDraft -> getPolicies ( ) as $ policy ) { $ policies [ $ policy -> id ] = $ policy ; } return $ policies ; }
Returns policies for passed RoleDraft object, indexed by their IDs.

@param RoleDraft $roleDraft
@return array
Returns policies for passed RoleDraft object indexed by their IDs .