You are here

public function FieldMappingProcessor::isSupported in Gutenberg 8.2

Whether the processor supports this block instance.

Parameters

array $block: The block array.

string $block_content: The inner block content.

Return value

bool Whether the block is supported.

Overrides GutenbergBlockProcessorInterface::isSupported

File

src/BlockProcessor/FieldMappingProcessor.php, line 26

Class

FieldMappingProcessor
Processor removing blocks with a "mappingFields" attribute.

Namespace

Drupal\gutenberg\BlockProcessor

Code

public function isSupported(array $block, $block_content = '') {
  return !empty($block['attrs']['mappingFields']) && is_array($block['attrs']['mappingFields']);
}