interface TocManagerInterface in TOC API 8
Provides an interface defining a TOC manager.
Hierarchy
- interface \Drupal\toc_api\TocManagerInterface
Expanded class hierarchy of TocManagerInterface
All classes that implement TocManagerInterface
File
- src/
TocManagerInterface.php, line 8
Namespace
Drupal\toc_apiView source
interface TocManagerInterface {
/**
* Constructs a new TOC object.
*
* @param string $id
* ID used to track the TOC object's instance. Typically, the ID can be
* the TOC implementation's module name.
* @param string $source
* The HTML content that contains header tags used to create a table of
* contents.
* @param array $options
* (optional) An associative array of options used to generate a table of
* contents and bookmarked headers.
*
* @return \Drupal\toc_api\TocInterface
* A new TOC object.
*/
public function create($id, $source, array $options = []);
/**
* Get the current TOC instance.
*
* @param string $id
* ID used to track the TOC object's instance. Typically, the ID can be
* the TOC implementation's module name.
*
* @return \Drupal\toc_api\TocInterface
* The current TOC instance.
*/
public function getToc($id);
/**
* Reset the current TOC instance.
*
* @param string $id
* ID used to track the TOC object's instance. Typically, the ID can be
* the TOC implementation's module name.
*/
public function reset($id = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TocManagerInterface:: |
public | function | Constructs a new TOC object. | 1 |
TocManagerInterface:: |
public | function | Get the current TOC instance. | 1 |
TocManagerInterface:: |
public | function | Reset the current TOC instance. | 1 |