Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\editor;
|
Chris@0
|
4
|
Chris@0
|
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
|
Chris@0
|
6
|
Chris@0
|
7 /**
|
Chris@0
|
8 * Provides an interface defining a text editor entity.
|
Chris@0
|
9 */
|
Chris@0
|
10 interface EditorInterface extends ConfigEntityInterface {
|
Chris@0
|
11
|
Chris@0
|
12 /**
|
Chris@0
|
13 * Returns whether this text editor has an associated filter format.
|
Chris@0
|
14 *
|
Chris@0
|
15 * A text editor may be created at the same time as the filter format it's
|
Chris@0
|
16 * going to be associated with; in that case, no filter format object is
|
Chris@0
|
17 * available yet.
|
Chris@0
|
18 *
|
Chris@0
|
19 * @return bool
|
Chris@0
|
20 */
|
Chris@0
|
21 public function hasAssociatedFilterFormat();
|
Chris@0
|
22
|
Chris@0
|
23 /**
|
Chris@0
|
24 * Returns the filter format this text editor is associated with.
|
Chris@0
|
25 *
|
Chris@0
|
26 * This could be NULL if the associated filter format is still being created.
|
Chris@0
|
27 * @see hasAssociatedFilterFormat()
|
Chris@0
|
28 *
|
Chris@0
|
29 * @return \Drupal\filter\FilterFormatInterface|null
|
Chris@0
|
30 */
|
Chris@0
|
31 public function getFilterFormat();
|
Chris@0
|
32
|
Chris@0
|
33 /**
|
Chris@0
|
34 * Returns the associated text editor plugin ID.
|
Chris@0
|
35 *
|
Chris@0
|
36 * @return string
|
Chris@0
|
37 * The text editor plugin ID.
|
Chris@0
|
38 */
|
Chris@0
|
39 public function getEditor();
|
Chris@0
|
40
|
Chris@0
|
41 /**
|
Chris@0
|
42 * Set the text editor plugin ID.
|
Chris@0
|
43 *
|
Chris@0
|
44 * @param string $editor
|
Chris@0
|
45 * The text editor plugin ID to set.
|
Chris@0
|
46 */
|
Chris@0
|
47 public function setEditor($editor);
|
Chris@0
|
48
|
Chris@0
|
49 /**
|
Chris@0
|
50 * Returns the text editor plugin-specific settings.
|
Chris@0
|
51 *
|
Chris@0
|
52 * @return array
|
Chris@0
|
53 * A structured array containing all text editor settings.
|
Chris@0
|
54 */
|
Chris@0
|
55 public function getSettings();
|
Chris@0
|
56
|
Chris@0
|
57 /**
|
Chris@0
|
58 * Sets the text editor plugin-specific settings.
|
Chris@0
|
59 *
|
Chris@0
|
60 * @param array $settings
|
Chris@0
|
61 * The structured array containing all text editor settings.
|
Chris@0
|
62 *
|
Chris@0
|
63 * @return $this
|
Chris@0
|
64 */
|
Chris@0
|
65 public function setSettings(array $settings);
|
Chris@0
|
66
|
Chris@0
|
67 /**
|
Chris@0
|
68 * Returns the image upload settings.
|
Chris@0
|
69 *
|
Chris@0
|
70 * @return array
|
Chris@0
|
71 * A structured array containing image upload settings.
|
Chris@0
|
72 */
|
Chris@0
|
73 public function getImageUploadSettings();
|
Chris@0
|
74
|
Chris@0
|
75 /**
|
Chris@0
|
76 * Sets the image upload settings.
|
Chris@0
|
77 *
|
Chris@0
|
78 * @param array $image_upload
|
Chris@0
|
79 * The structured array containing image upload settings.
|
Chris@0
|
80 *
|
Chris@0
|
81 * @return $this
|
Chris@0
|
82 */
|
Chris@0
|
83 public function setImageUploadSettings(array $image_upload);
|
Chris@0
|
84
|
Chris@0
|
85 }
|