function showEntry($t, $metadata, $favourite = FALSE)
{
$basequerystring = '?' . 'entityID=' . urlencode($t->data['entityID']) . '&' . 'return=' . urlencode($t->data['return']) . '&' . 'returnIDParam=' . urlencode($t->data['returnIDParam']) . '&idpentityid=';
$extra = $favourite ? ' favourite' : '';
$html = '<a class="metaentry' . $extra . '" href="' . $basequerystring . urlencode($metadata['entityid']) . '">';
$html .= '' . htmlspecialchars(getTranslatedName($t, $metadata)) . '';
#print_r($metadata['scopes']);
// if (!empty($idpentry['description'])) {
// $html .= ' <p>' . htmlspecialchars($t->t('idpdesc_' . $metadata['entityid'])) . '<br />';
// }
if (array_key_exists('icon', $metadata) && $metadata['icon'] !== NULL) {
$iconUrl = SimpleSAML_Utilities::resolveURL($metadata['icon']);
$html .= '<img alt="Icon for identity provider" class="entryicon" src="' . htmlspecialchars($iconUrl) . '" />';
}
// $html .= '<input id="preferredidp" type="submit" name="idp_' .
// htmlspecialchars($metadata['entityid']) . '" value="' .
// $t->t('select') . '" /></p>';
$html .= '</a>';
return $html;
}