function theme_features_component_list in Features 7
Same name and namespace in other branches
- 6 theme/theme.inc \theme_features_component_list()
- 7.2 theme/theme.inc \theme_features_component_list()
Theme individual components in a component list.
2 theme calls to theme_features_component_list()
- template_preprocess_features_admin_components in theme/
theme.inc - Display feature component info
- theme_features_components in theme/
theme.inc - Theme a set of features export components.
File
- theme/
theme.inc, line 294
Code
function theme_features_component_list($vars) {
$components = $vars['components'];
$source = $vars['source'];
$conflicts = $vars['conflicts'];
$list = array();
foreach ($components as $component) {
// If component is not in source list, it was autodetected
if (!in_array($component, $source)) {
$list[] = "<span class='features-detected'>" . check_plain($component) . "</span>";
}
elseif (is_array($conflicts) && in_array($component, $conflicts)) {
$list[] = "<span class='features-conflict'>" . check_plain($component) . "</span>";
}
else {
$list[] = "<span class='features-source'>" . check_plain($component) . "</span>";
}
}
foreach ($source as $component) {
// If a source component is no longer in the items, it was removed because
// it is provided by a dependency.
if (!in_array($component, $components)) {
$list[] = "<span class='features-dependency'>" . check_plain($component) . "</span>";
}
}
return "<span class='features-component-list'>" . implode(' ', $list) . "</span>";
}