1 layout.theme.inc | theme_layout_condition_info($variables) |
Outputs a list of conditions. Used in the layout listing page.
Parameters
array $variables: An array with a single value: "layout", which contains a layout object or a menu item.
Return value
string:
File
- core/
modules/ layout/ layout.theme.inc, line 80 - 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();
if (isset($layout->conditions)) {
foreach ($layout->conditions as $access_key => $layout_access) {
$conditions[] = $layout_access->summary();
}
}
$output = '<div class="layout-conditions-list">';
// Don't show empty text if this is a menu item.
if (empty($conditions) && isset($layout->menu)) {
$output .= t('No conditions set.');
}
else {
$output .= theme('item_list', array('items' => $conditions));
}
$output .= '</div>';
return $output;
}