function ds_prepare_regions_html in Display Suite 8.2
Same name and namespace in other branches
- 8.3 drush/ds.drush.inc \ds_prepare_regions_html()
- 7.2 drush/ds.drush.inc \ds_prepare_regions_html()
- 7 ds.drush.inc \ds_prepare_regions_html()
Prepare HTML structure for an array of regions.
1 call to ds_prepare_regions_html()
- drush_ds_build in drush/
ds.drush.inc - Create a basic template and configuration file for a Display Suite layout.
File
- drush/
ds.drush.inc, line 168 - Display Suite drush integration.
Code
function ds_prepare_regions_html($region_names) {
$output = array();
foreach ($region_names as $name) {
$machine_name = ds_prepare_machine_name($name);
$output[] = <<<END
<{{ \${<span class="php-variable">$machine_name</span>}_wrapper }} class="group-left{{ \${<span class="php-variable">$machine_name</span>}_classes }}">
{% if \${<span class="php-variable">$machine_name</span>} is not null %}
{{ \${<span class="php-variable">$machine_name</span>} }}
{% endif %}
</{{ \${<span class="php-variable">$machine_name</span>}_wrapper }}>
END;
}
return implode("\n\n", $output);
}