summaryrefslogtreecommitdiffstats
path: root/core/modules/breakpoint/src/BreakpointInterface.php
blob: cf62bcd9d3b50e9e80b07808fc6f40440692e364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php

/**
 * @file
 * Contains \Drupal\breakpoint\Entity\BreakpointInterface.
 */

namespace Drupal\breakpoint;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Provides an interface defining a breakpoint entity.
 */
interface BreakpointInterface extends ConfigEntityInterface {

  /**
   * Checks if the breakpoint is valid.
   *
   * @throws \Drupal\breakpoint\InvalidBreakpointSourceTypeException
   * @throws \Drupal\breakpoint\InvalidBreakpointSourceException
   * @throws \Drupal\breakpoint\InvalidBreakpointNameException
   * @throws \Drupal\breakpoint\InvalidBreakpointMediaQueryException
   *
   * @see isValidMediaQuery()
   */
  public function isValid();

  /**
   * Checks if a mediaQuery is valid.
   *
   * @throws \Drupal\breakpoint\InvalidBreakpointMediaQueryException
   *
   * @return bool
   *   Returns TRUE if the media query is valid.
   *
   * @see http://www.w3.org/TR/css3-mediaqueries/
   * @see http://www.w3.org/Style/CSS/Test/MediaQueries/20120229/reports/implement-report.html
   * @see https://github.com/adobe/webkit/blob/master/Source/WebCore/css/
   */
  public static function isValidMediaQuery($media_query);

}