You are here

public function BlockParserFrame::__construct in Gutenberg 8.2

Constructor.

Will populate object properties from the provided arguments.

Parameters

BlockParserBlock $block: Full or partial block.

int $token_start: Byte offset into document for start of parse token.

int $token_length: Byte length of entire parse token string.

int $prev_offset: Byte offset into document for after parse token ends.

int $leading_html_start: Byte offset into document where leading HTML before token starts.

File

src/Parser/BlockParserFrame.php, line 72

Class

BlockParserFrame
Class BlockParserFrame.

Namespace

Drupal\gutenberg\Parser

Code

public function __construct(BlockParserBlock $block, $token_start, $token_length, $prev_offset = NULL, $leading_html_start = NULL) {
  $this->block = $block;
  $this->tokenStart = $token_start;
  $this->tokenLength = $token_length;
  $this->prevOffset = isset($prev_offset) ? $prev_offset : $token_start + $token_length;
  $this->leadingHtmlStart = $leading_html_start;
}