summaryrefslogtreecommitdiffstats
path: root/core/modules/responsive_image/src/ResponsiveImageMappingInterface.php
blob: bb8b535256e074cdbb565d58d5d8a6cf5aef7df5 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php

/**
 * @file
 * Contains \Drupal\responsive_image\ResponsiveImageMappingInterface.
 */

namespace Drupal\responsive_image;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Provides an interface defining a responsive_image mapping entity.
 */
interface ResponsiveImageMappingInterface extends ConfigEntityInterface {

  /**
   * Checks if there is at least one mapping defined.
   *
   * return bool
   *   Whether the entity has any responsive_image mappings.
   */
  public function hasMappings();

  /**
   * Sets the mappings for the responsive_image mapping.
   *
   * The array is keyed by the Breakpoint Group Id and then then by each
   * Breakpoints multipliers within the Breakpoint Group.
   *
   * @param array[] $mappings
   *   The mappings the responsive_image mapping will be set with.
   *
   * @return $this
   */
  public function setMappings(array $mappings);

  /**
   * Returns the mappings for the responsive_image mapping.
   *
   * @return array[]
   *   The responsive_imagemappings.
   */
  public function getMappings();

  /**
   * Sets the breakpoint group for the responsive_image mapping.
   *
   * @param \Drupal\breakpoint\Entity\BreakpointGroup $breakpoint_group
   *   The responsive_image mappings breakpoint group.
   *
   * @return $this
   */
  public function setBreakpointGroup($breakpoint_group);

  /**
   * Returns the breakpoint group for the responsive_image mapping.
   *
   * @return \Drupal\breakpoint\Entity\BreakpointGroup
   *   The responsive_image mappings breakpoint group.
   */
  public function getBreakpointGroup();

}