You are here

interface WebformThemeManagerInterface in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformThemeManagerInterface.php \Drupal\webform\WebformThemeManagerInterface

Defines an interface for theme manager classes.

Hierarchy

Expanded class hierarchy of WebformThemeManagerInterface

All classes that implement WebformThemeManagerInterface

File

src/WebformThemeManagerInterface.php, line 8

Namespace

Drupal\webform
View source
interface WebformThemeManagerInterface {

  /**
   * Get a theme's name.
   *
   * @return string
   *   A theme's name
   */
  public function getThemeName($name);

  /**
   * Get themes as associative array.
   *
   * @return array
   *   An associative array containing theme name.
   */
  public function getThemeNames();

  /**
   * Get all active theme names.
   *
   * @return array
   *   An array containing the active theme and base theme names.
   */
  public function getActiveThemeNames();

  /**
   * Determine if the current request has an active theme.
   *
   * @return bool
   *   TRUE if the current request has an active theme.
   */
  public function hasActiveTheme();

  /**
   * Determine if a theme name is being used the active or base theme.
   *
   * @param string $theme_name
   *   A theme name.
   *
   * @return bool
   *   TRUE if a theme name is being used the active or base theme.
   */
  public function isActiveTheme($theme_name);

  /**
   * Sets the current theme the theme.
   *
   * @param string $theme_name
   *   (optional) A theme name. Defaults the default theme.
   */
  public function setCurrentTheme($theme_name = NULL);

  /**
   * Sets the current theme the active theme.
   */
  public function setActiveTheme();

  /**
   * Renders HTML given a structured array tree.
   *
   * @param array $elements
   *   The structured array describing the data to be rendered.
   * @param bool $default_theme
   *   Render using the default theme. Defaults to TRUE.
   *
   * @return \Drupal\Component\Render\MarkupInterface
   *   The rendered HTML.
   */
  public function render(array &$elements, $default_theme = TRUE);

  /**
   * Renders using the default theme final HTML in situations where no assets are needed.
   *
   * @param array $elements
   *   The structured array describing the data to be rendered.
   * @param bool $default_theme
   *   Render using the default theme. Defaults to TRUE.
   *
   * @return \Drupal\Component\Render\MarkupInterface
   *   The rendered HTML.
   */
  public function renderPlain(array &$elements, $default_theme = TRUE);

}

Members

Namesort descending Modifiers Type Description Overrides
WebformThemeManagerInterface::getActiveThemeNames public function Get all active theme names. 1
WebformThemeManagerInterface::getThemeName public function Get a theme's name. 1
WebformThemeManagerInterface::getThemeNames public function Get themes as associative array. 1
WebformThemeManagerInterface::hasActiveTheme public function Determine if the current request has an active theme. 1
WebformThemeManagerInterface::isActiveTheme public function Determine if a theme name is being used the active or base theme. 1
WebformThemeManagerInterface::render public function Renders HTML given a structured array tree. 1
WebformThemeManagerInterface::renderPlain public function Renders using the default theme final HTML in situations where no assets are needed. 1
WebformThemeManagerInterface::setActiveTheme public function Sets the current theme the active theme. 1
WebformThemeManagerInterface::setCurrentTheme public function Sets the current theme the theme. 1