public static function Blazy::container in Blazy 7
Returns common content with prefix and suffix containers.
2 calls to Blazy::container()
- BlazyGrid::build in src/
BlazyGrid.php - Returns items wrapped by theme_item_list(), can be a grid, or plain list.
- theme_blazy in ./
blazy.theme.inc - Returns HTML for a blazy template.
File
- src/
Blazy.php, line 31
Class
- Blazy
- Implements BlazyInterface.
Namespace
Drupal\blazyCode
public static function container($content, $attributes, $tag = 'div') {
$build = array_filter($content);
// Supports DIV only without $content such as for CSS background.
if ($build || $attributes) {
$build['#prefix'] = '<' . $tag . drupal_attributes($attributes) . '>';
$build['#suffix'] = '</' . $tag . '>';
}
return $build;
}