function theme_entityconnect_entity_add_list in Entity connect 7
Same name and namespace in other branches
- 7.2 includes/entityconnect.pages.inc \theme_entityconnect_entity_add_list()
Returns HTML for a list of available entity bundles.
Parameters
array $variables: An associative array containing:
- content: An array of content types.
2 theme calls to theme_entityconnect_entity_add_list()
- entityconnect_add in includes/
entityconnect.menu.inc - Page callback: Load cached form info.
- entityconnect_edit in includes/
entityconnect.menu.inc - Page callback: Redirect to edit form.
File
- includes/
entityconnect.pages.inc, line 43 - Page callbacks.
Code
function theme_entityconnect_entity_add_list($variables) {
$entities = $variables['items'];
$cache_id = $variables['cache id'];
if ($entities) {
$output = '<ul class="admin-list">';
foreach ($entities as $item) {
$output .= '<li class="clearfix"><span class="label">' . l($item['label'], $item['href'], array(
'query' => array(
"build_cache_id" => $cache_id,
"child" => TRUE,
),
)) . '</span>';
if (array_key_exists('description', $item)) {
$output .= '<div class="description">' . filter_xss_admin($item['description']) . '</div>';
}
$output .= '</li>';
}
$output .= '</ul>';
}
else {
$output = '<p>' . t('You have not selected any entities.') . '</p>';
}
return $output;
}