public function MappingFieldsHelper::filterMappingFieldsBlock in Gutenberg 8.2
Filter Gutenberg blocks to only those with mappingFields attributes.
Parameters
array $block: The Gutenberg block definition.
Return value
bool Whether the block is supported.
File
- src/
MappingFieldsHelper.php, line 167
Class
- MappingFieldsHelper
- Handles the mappingFields configuration manipulation.
Namespace
Drupal\gutenbergCode
public function filterMappingFieldsBlock(array $block) {
if (isset($block['attrs']['mappingFields'])) {
$mapping_fields = $block['attrs']['mappingFields'];
return $mapping_fields && is_array($mapping_fields);
}
return FALSE;
}