protected function prepareListUserRole(array &$roles)
    {
        $permissions = $this->getPermissionsUserRole();

        foreach ($roles as &$role) {
            if (!empty($role['permissions'])) {
                $list = array_intersect_key($permissions, array_flip($role['permissions']));
                $role['permissions_list'] = array_chunk($list, 20);
            }
        }
    }
protected function prepareListUserRole(array &$roles)
    {
        $permissions = $this->getPermissionsUserRole();

        foreach ($roles as &$role) {
            if (!empty($role['permissions'])) {
                $list = array_intersect_key($permissions, array_flip($role['permissions']));
                $role['permissions_list'] = array_chunk($list, 20);
            }
        }
    }
protected function prepareListUserRole ( array & $ roles ) { $ permissions = $ this -> getPermissionsUserRole ( ) ; foreach ( $ roles as & $ role ) { if ( ! empty ( $ role [ 'permissions' ] ) ) { $ list = array_intersect_key ( $ permissions , array_flip ( $ role [ 'permissions' ] ) ) ; $ role [ 'permissions_list' ] = array_chunk ( $ list , 20 ) ; } } }
Prepare an array of user roles
@param array $roles
Prepare an array of user roles