public static function prepare_identity_providers_for_output($identityproviders, renderer_base $output) {
        $data = [];
        foreach ($identityproviders as $idp) {
            if (!empty($idp['icon'])) {
                // Pre-3.3 auth plugins provide icon as a pix_icon instance. New auth plugins (since 3.3) provide iconurl.
                $idp['iconurl'] = $output->image_url($idp['icon']->pix, $idp['icon']->component);
            }
            if ($idp['iconurl'] instanceof moodle_url) {
                $idp['iconurl'] = $idp['iconurl']->out(false);
            }
            unset($idp['icon']);
            if ($idp['url'] instanceof moodle_url) {
                $idp['url'] = $idp['url']->out(false);
            }
            $data[] = $idp;
        }
        return $data;
    }
public static function prepare_identity_providers_for_output($identityproviders, renderer_base $output) {
        $data = [];
        foreach ($identityproviders as $idp) {
            if (!empty($idp['icon'])) {
                // Pre-3.3 auth plugins provide icon as a pix_icon instance. New auth plugins (since 3.3) provide iconurl.
                $idp['iconurl'] = $output->image_url($idp['icon']->pix, $idp['icon']->component);
            }
            if ($idp['iconurl'] instanceof moodle_url) {
                $idp['iconurl'] = $idp['iconurl']->out(false);
            }
            unset($idp['icon']);
            if ($idp['url'] instanceof moodle_url) {
                $idp['url'] = $idp['url']->out(false);
            }
            $data[] = $idp;
        }
        return $data;
    }
public static function prepare_identity_providers_for_output ( $ identityproviders , renderer_base $ output ) { $ data = [ ] ; foreach ( $ identityproviders as $ idp ) { if ( ! empty ( $ idp [ 'icon' ] ) ) { // Pre-3.3 auth plugins provide icon as a pix_icon instance. New auth plugins (since 3.3) provide iconurl. $ idp [ 'iconurl' ] = $ output -> image_url ( $ idp [ 'icon' ] -> pix , $ idp [ 'icon' ] -> component ) ; } if ( $ idp [ 'iconurl' ] instanceof moodle_url ) { $ idp [ 'iconurl' ] = $ idp [ 'iconurl' ] -> out ( false ) ; } unset ( $ idp [ 'icon' ] ) ; if ( $ idp [ 'url' ] instanceof moodle_url ) { $ idp [ 'url' ] = $ idp [ 'url' ] -> out ( false ) ; } $ data [ ] = $ idp ; } return $ data ; }
Prepare a list of identity providers for output.

@param array $identityproviders as returned by {@link self::get_identity_providers()}
@param renderer_base $output
@return array the identity providers ready for output
Prepare a list of identity providers for output .