You are here

interface ViewportResolverInterface in Viewport 8

Defines an interface for viewport tag resolvers.

Hierarchy

Expanded class hierarchy of ViewportResolverInterface

All classes that implement ViewportResolverInterface

File

src/ViewportResolverInterface.php, line 8

Namespace

Drupal\viewport
View source
interface ViewportResolverInterface {

  /**
   * Checks if the given path (or current path) needs a custom viewport tag.
   *
   * @return bool
   *   Whether the given path needs to use a custom viewport or not.
   */
  public function isPathSelected($path = NULL);

  /**
   * Generates and returns an html_head tag array for use as page #attachment.
   *
   * @return array
   *   Array specifying the html_head '#tag' and '#attributes' properties.
   */
  public function generateViewportTagArray();

}

Members

Namesort descending Modifiers Type Description Overrides
ViewportResolverInterface::generateViewportTagArray public function Generates and returns an html_head tag array for use as page #attachment. 1
ViewportResolverInterface::isPathSelected public function Checks if the given path (or current path) needs a custom viewport tag. 1