You are here

interface NodeElementInterface in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Parser/Tree/NodeElementInterface.php \Drupal\xbbcode\Parser\Tree\NodeElementInterface

Interface for node elements.

Hierarchy

Expanded class hierarchy of NodeElementInterface

All classes that implement NodeElementInterface

4 files declare their use of NodeElementInterface
ParserInterface.php in src/Parser/ParserInterface.php
PreparedTagElement.php in src/PreparedTagElement.php
XBBCodeFilter.php in src/Plugin/Filter/XBBCodeFilter.php
XBBCodeParser.php in src/Parser/XBBCodeParser.php

File

src/Parser/Tree/NodeElementInterface.php, line 8

Namespace

Drupal\xbbcode\Parser\Tree
View source
interface NodeElementInterface extends ElementInterface {

  /**
   * Append an element to the children of this element.
   *
   * @param \Drupal\xbbcode\Parser\Tree\ElementInterface $element
   *   The new element.
   */
  public function append(ElementInterface $element) : void;

  /**
   * Get all children of the element.
   *
   * @return \Drupal\xbbcode\Parser\Tree\ElementInterface[]
   *   The children.
   */
  public function getChildren() : array;

  /**
   * Retrieve the rendered content of the element.
   *
   * @return mixed
   *   The rendered content.
   */
  public function getContent();

  /**
   * Retrieve the rendered output of each child.
   *
   * @param bool $force_render
   *   (Optional) Set to FALSE to only return output that is already rendered.
   *   By default, this method renders it implicitly.
   *
   * @return \Drupal\xbbcode\Parser\Tree\OutputElementInterface[]
   *   The sequence of rendered outputs.
   */
  public function getRenderedChildren($force_render = TRUE) : array;

  /**
   * Retrieve the descendants of the node.
   *
   * @return \Drupal\xbbcode\Parser\Tree\ElementInterface[]|\iterable
   *   Every descendant of the node.
   */
  public function getDescendants();

}

Members

Namesort descending Modifiers Type Description Overrides
ElementInterface::render public function Render this element to a string. 4
NodeElementInterface::append public function Append an element to the children of this element. 2
NodeElementInterface::getChildren public function Get all children of the element. 2
NodeElementInterface::getContent public function Retrieve the rendered content of the element. 2
NodeElementInterface::getDescendants public function Retrieve the descendants of the node. 2
NodeElementInterface::getRenderedChildren public function Retrieve the rendered output of each child. 2