You are here

function theme_entityconnect_entity_add_list in Entity connect 7.2

Same name and namespace in other branches
  1. 7 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.

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;
}