You are here

interface TocInterface in TOC API 8

Provides an interface defining a TOC.

Hierarchy

Expanded class hierarchy of TocInterface

All classes that implement TocInterface

File

src/TocInterface.php, line 8

Namespace

Drupal\toc_api
View source
interface TocInterface {

  /**
   * Returns the unaltered source content.
   *
   * @return string
   *   The unaltered source content.
   */
  public function getSource();

  /**
   * Returns the content with all headers assigned a unique id.
   *
   * @return string
   *   The content with all headers assigned a unique id.
   */
  public function getContent();

  /**
   * Returns the TOC options.
   *
   * @return array
   *   The table of contents options.
   */
  public function getOptions();

  /**
   * Return the table of contents title.
   *
   * @return string
   *   The table of contents title.
   */
  public function getTitle();

  /**
   * Returns an array of allowed tags names.
   *
   * @return array
   *   An array of allowed tags names.
   */
  public function getAllowedTags();

  /**
   * Returns a hierarchical array of headers.
   *
   * @return array
   *   An hierarchical array of headers.
   */
  public function getHeaderCount();

  /**
   * Returns a flat associative array of headers.
   *
   * @return array
   *   A flat associative array of headers.
   */
  public function getIndex();

  /**
   * Returns a hierarchical array of headers.
   *
   * @return array
   *   An hierarchical array of headers.
   */
  public function getTree();

  /**
   * Indicates if this table of contents is displayed in a block.
   *
   * @return bool
   *   TRUE if this table of contents is displayed in a block.
   */
  public function isBlock();

  /**
   * Indicates if this table of contents is visible.
   *
   * @return bool
   *   TRUE if this table of contents is visible.
   */
  public function isVisible();

}

Members

Namesort descending Modifiers Type Description Overrides
TocInterface::getAllowedTags public function Returns an array of allowed tags names. 1
TocInterface::getContent public function Returns the content with all headers assigned a unique id. 1
TocInterface::getHeaderCount public function Returns a hierarchical array of headers. 1
TocInterface::getIndex public function Returns a flat associative array of headers. 1
TocInterface::getOptions public function Returns the TOC options. 1
TocInterface::getSource public function Returns the unaltered source content. 1
TocInterface::getTitle public function Return the table of contents title. 1
TocInterface::getTree public function Returns a hierarchical array of headers. 1
TocInterface::isBlock public function Indicates if this table of contents is displayed in a block. 1
TocInterface::isVisible public function Indicates if this table of contents is visible. 1