2a8712c785c717b94e291334f81a172de180f6f9
[yaffs-website] / web / modules / contrib / slick / src / Entity / SlickInterface.php
1 <?php
2
3 namespace Drupal\slick\Entity;
4
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6
7 /**
8  * Provides an interface defining a Slick entity.
9  */
10 interface SlickInterface extends ConfigEntityInterface {
11
12   /**
13    * Returns the number of breakpoints.
14    *
15    * @return int
16    *   The number of the provided breakpoints.
17    */
18   public function getBreakpoints();
19
20   /**
21    * Returns the Slick skin.
22    *
23    * @return string
24    *   The name of the Slick skin.
25    */
26   public function getSkin();
27
28   /**
29    * Returns the Slick options by group, or property.
30    *
31    * @param string $group
32    *   The name of setting group: settings, responsives.
33    * @param string $property
34    *   The name of specific property: prevArrow, nexArrow.
35    *
36    * @return mixed|array|null
37    *   Available options by $group, $property, all, or NULL.
38    */
39   public function getOptions($group = NULL, $property = NULL);
40
41   /**
42    * Returns the array of slick settings.
43    *
44    * @return array
45    *   The array of settings.
46    */
47   public function getSettings();
48
49   /**
50    * Sets the array of slick settings.
51    *
52    * @param array $settings
53    *   The new array of settings.
54    *
55    * @return $this
56    *   The class instance that this method is called on.
57    */
58   public function setSettings(array $settings = []);
59
60   /**
61    * Returns the value of a slick setting.
62    *
63    * @param string $setting_name
64    *   The setting name.
65    *
66    * @return mixed
67    *   The setting value.
68    */
69   public function getSetting($setting_name);
70
71   /**
72    * Sets the value of a slick setting.
73    *
74    * @param string $setting_name
75    *   The setting name.
76    *
77    * @return $this
78    *   The class instance that this method is called on.
79    */
80   public function setSetting($setting_name, $value);
81
82   /**
83    * Returns available slick default options under group 'settings'.
84    *
85    * @param string $group
86    *   The name of group: settings, responsives.
87    *
88    * @return array
89    *   The default settings under options.
90    */
91   public static function defaultSettings($group = 'settings');
92
93   /**
94    * Returns the group this optioset instance belongs to for easy selections.
95    *
96    * @return string
97    *   The name of the optionset group.
98    */
99   public function getGroup();
100
101   /**
102    * Returns whether to optimize the stored options, or not.
103    *
104    * @return bool
105    *   If true, the stored options will be cleaned out from defaults.
106    */
107   public function optimized();
108
109 }