You are here

public function TocManagerInterface::create in TOC API 8

Constructs a new TOC object.

Parameters

string $id: ID used to track the TOC object's instance. Typically, the ID can be the TOC implementation's module name.

string $source: The HTML content that contains header tags used to create a table of contents.

array $options: (optional) An associative array of options used to generate a table of contents and bookmarked headers.

Return value

\Drupal\toc_api\TocInterface A new TOC object.

1 method overrides TocManagerInterface::create()
TocManager::create in src/TocManager.php
Constructs a new TOC object.

File

src/TocManagerInterface.php, line 26

Class

TocManagerInterface
Provides an interface defining a TOC manager.

Namespace

Drupal\toc_api

Code

public function create($id, $source, array $options = []);