You are here

interface RendererInterface in Entity Print 8.2

Same name and namespace in other branches
  1. 8 src/Renderer/RendererInterface.php \Drupal\entity_print\Renderer\RendererInterface

The renderer interface.

Hierarchy

Expanded class hierarchy of RendererInterface

All classes that implement RendererInterface

File

src/Renderer/RendererInterface.php, line 8

Namespace

Drupal\entity_print\Renderer
View source
interface RendererInterface {

  /**
   * Gets the renderable for this entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface[] $entities
   *   The entities we're rendering.
   *
   * @return array
   *   The renderable array for the entity.
   */
  public function render(array $entities);

  /**
   * Generates the HTML from the renderable array of entities.
   *
   * @param array $entities
   *   An array of entities we're rendering.
   * @param array $render
   *   A renderable array.
   * @param bool $use_default_css
   *   TRUE if we should inject our default CSS otherwise FALSE.
   * @param bool $optimize_css
   *   TRUE if we should compress the CSS otherwise FALSE.
   *
   * @return string
   *   The generated HTML.
   */
  public function generateHtml(array $entities, array $render, $use_default_css, $optimize_css);

  /**
   * Get the filename for the entity we're printing *without* the extension.
   *
   * @param \Drupal\Core\Entity\EntityInterface[] $entities
   *   The entities for which to generate the filename from.
   *
   * @return string
   *   The generate file name for this entity.
   */
  public function getFilename(array $entities);

}

Members

Namesort descending Modifiers Type Description Overrides
RendererInterface::generateHtml public function Generates the HTML from the renderable array of entities. 1
RendererInterface::getFilename public function Get the filename for the entity we're printing *without* the extension. 1
RendererInterface::render public function Gets the renderable for this entity. 2