summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/breakpoint/src/Breakpoint.php
blob: d66c96be3b380a1fab6459a447c9805114573680 (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php

namespace Drupal\breakpoint;

use Drupal\Core\Plugin\PluginBase;

/**
 * Default object used for breakpoint plugins.
 *
 * @see \Drupal\breakpoint\BreakpointManager
 * @see plugin_api
 */
class Breakpoint extends PluginBase implements BreakpointInterface {

  /**
   * {@inheritdoc}
   */
  public function getLabel() {
    // Translate the plugin label defined in the *.breakpoints.yml file.
    // phpcs:ignore Drupal.Semantics.FunctionT.NotLiteralString
    return $this->t($this->pluginDefinition['label'], [], ['context' => 'breakpoint']);
  }

  /**
   * {@inheritdoc}
   */
  public function getWeight() {
    return (int) $this->pluginDefinition['weight'];
  }

  /**
   * {@inheritdoc}
   */
  public function getMediaQuery() {
    return $this->pluginDefinition['mediaQuery'];
  }

  /**
   * {@inheritdoc}
   */
  public function getMultipliers() {
    return $this->pluginDefinition['multipliers'];
  }

  /**
   * {@inheritdoc}
   */
  public function getProvider() {
    return $this->pluginDefinition['provider'];
  }

  /**
   * {@inheritdoc}
   */
  public function getGroup() {
    return $this->pluginDefinition['group'];
  }

}