function _views_row_insert_get_blocks in Views Row Insert 8
Same name and namespace in other branches
- 7 views_row_insert.module \_views_row_insert_get_blocks()
Provides list of available system blocks for the form options.
Return value
array Returns array.
1 call to _views_row_insert_get_blocks()
- ViewsRowInsert::buildOptionsForm in src/
Plugin/ views/ style/ ViewsRowInsert.php - Provide a form to edit options for this plugin.
File
- ./
views_row_insert.module, line 51 - Contains views_row_insert.module.
Code
function _views_row_insert_get_blocks() {
$options = [];
$definitions = _views_row_insert_get_blocks_definitions();
foreach ($definitions as $id => $block) {
if (is_string($block['admin_label'])) {
$label = $block['admin_label'];
}
else {
$label = $block['admin_label']
->render();
}
$options[$id] = $label;
}
return $options;
}