1 layout.theme.inc theme_layout_condition_info($variables)

Outputs a list of conditions for a layout. Used in the layout listing page.

Parameters

$variables: An array with a single value: "layout", which contains the layout object.

Return value

string

File

core/modules/layout/layout.theme.inc, line 79
Theme functions for the Layout module.

Code

function theme_layout_condition_info($variables) {
  /* @var Layout $layout */
  $layout = $variables['layout'];
  // Build a list of visibility conditions on this layout
  $conditions = array();
  foreach ($layout->conditions as $access_key => $layout_access) {
    $conditions[] = $layout_access->summary();
  }
  $output = '<div class="layout-conditions-list">';
  if (empty($conditions)) {
    $output .= t('No conditions set.');
  }
  else {
    $output .= theme('item_list', array('items' => $conditions));
  }
  $output .= '</div>';

  return $output;
}