Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / paragraphs / src / ParagraphInterface.php
1 <?php
2
3 namespace Drupal\paragraphs;
4
5 use Drupal\user\EntityOwnerInterface;
6 use Drupal\Core\Entity\ContentEntityInterface;
7 use Drupal\entity_reference_revisions\EntityNeedsSaveInterface;
8
9 /**
10  * Provides an interface defining a paragraphs entity.
11  * @ingroup paragraphs
12  */
13 interface ParagraphInterface extends ContentEntityInterface, EntityOwnerInterface, EntityNeedsSaveInterface {
14
15   /**
16    * Gets the parent entity of the paragraph.
17    *
18    * Preserves language context with translated entities.
19    *
20    * @return ContentEntityInterface
21    *   The parent entity.
22    */
23   public function getParentEntity();
24
25   /**
26    * Returns short summary for paragraph.
27    *
28    * @param array $options
29    *   (optional) Array of additional options, with the following elements:
30    *   - 'show_behavior_summary': Whether the summary should contain the
31    *     behavior settings. Defaults to TRUE to show behavior settings in the
32    *     summary.
33    *   - 'depth_limit': Depth limit of how many nested paragraph summaries are
34    *     allowed. Defaults to 1 to show nested paragraphs only on top level.
35    *
36    * @return string
37    *   The text without tags.
38    */
39   public function getSummary(array $options = []);
40
41   /**
42    * Returns a flag whether a current revision has been changed.
43    *
44    * The current instance is being compared with the latest saved revision.
45    *
46    * @return bool
47    *   TRUE in case the current revision changed. Otherwise, FALSE.
48    *
49    * @see \Drupal\Core\Entity\ContentEntityBase::hasTranslationChanges()
50    */
51   public function isChanged();
52
53   /**
54    * Returns the paragraph type / bundle name as string.
55    *
56    * @return string
57    *   The Paragraph bundle name.
58    */
59   public function getType();
60
61   /**
62    * Returns the paragraph type.
63    *
64    * @return ParagraphsTypeInterface
65    *   The Paragraph Type.
66    */
67   public function getParagraphType();
68
69   /**
70    * Gets all the behavior settings.
71    *
72    * @return array
73    *   The array of behavior settings.
74    */
75   public function getAllBehaviorSettings();
76
77   /**
78    * Gets the behavior setting of an specific plugin.
79    *
80    * @param string $plugin_id
81    *   The plugin ID for which to get the settings.
82    * @param string|array $key
83    *   Values are stored as a multi-dimensional associative array. If $key is a
84    *   string, it will return $values[$key]. If $key is an array, each element
85    *   of the array will be used as a nested key. If $key = array('foo', 'bar')
86    *   it will return $values['foo']['bar'].
87    * @param mixed $default
88    *   (optional) The default value if the specified key does not exist.
89    *
90    * @return mixed
91    *   The value for the given key.
92    */
93   public function &getBehaviorSetting($plugin_id, $key, $default = NULL);
94
95   /**
96    * Sets all the behavior settings of a plugin.
97    *
98    * @param array $settings
99    *   The behavior settings from the form.
100    */
101   public function setAllBehaviorSettings(array $settings);
102
103   /**
104    * Sets the behavior settings of a plugin.
105    *
106    * @param string $plugin_id
107    *   The plugin ID for which to set the settings.
108    * @param array $settings
109    *   The behavior settings from the form.
110    */
111   public function setBehaviorSettings($plugin_id, array $settings);
112
113 }