protected function BlazyManager::prepareBuild in Blazy 8.2
Same name and namespace in other branches
- 7 src/BlazyManager.php \Drupal\blazy\BlazyManager::prepareBuild()
Prepares Blazy outputs, extract items as indices.
2 calls to BlazyManager::prepareBuild()
- BlazyManager::build in src/
BlazyManager.php - Returns the contents using theme_field(), or theme_item_list().
- BlazyManager::preRenderBuild in src/
BlazyManager.php - Builds the Blazy outputs as a structured array ready for ::renderer().
File
- src/
BlazyManager.php, line 540
Class
- BlazyManager
- Implements a public facing blazy manager.
Namespace
Drupal\blazyCode
protected function prepareBuild(array &$build) {
// If children are grouped within items property, reset to indexed keys.
// Blazy comes late to the party after sub-modules decided what they want
// where items may be stored as direct indices, or put into items property.
// Actually the same issue happens at core where contents may be indexed or
// grouped. Meaning not a problem at all, only a problem for consistency.
$build = isset($build['items']) ? $build['items'] : $build;
unset($build['items'], $build['settings']);
}