You are here

public function GutenbergBlockProcessorManager::addProcessor in Gutenberg 8.2

Adds a block processor object.

Parameters

\Drupal\gutenberg\BlockProcessor\GutenbergBlockProcessorInterface $processor: The processor object to add.

int $priority: The priority of the processor being added.

File

src/BlockProcessor/GutenbergBlockProcessorManager.php, line 38

Class

GutenbergBlockProcessorManager
Gutenberg block processor manager.

Namespace

Drupal\gutenberg\BlockProcessor

Code

public function addProcessor(GutenbergBlockProcessorInterface $processor, $priority = 0) {
  $this->blockProcessors[$priority][] = $processor;
  $this->sortedProcessors = NULL;
}