Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\image;
|
Chris@0
|
4
|
Chris@0
|
5 /**
|
Chris@0
|
6 * Interface for storage controller for "image style" configuration entities.
|
Chris@0
|
7 */
|
Chris@0
|
8 interface ImageStyleStorageInterface {
|
Chris@0
|
9
|
Chris@0
|
10 /**
|
Chris@0
|
11 * Stores a replacement ID for an image style being deleted.
|
Chris@0
|
12 *
|
Chris@0
|
13 * The method stores a replacement style to be used by the configuration
|
Chris@0
|
14 * dependency system when a image style is deleted. The replacement style is
|
Chris@0
|
15 * replacing the deleted style in other configuration entities that are
|
Chris@0
|
16 * depending on the image style being deleted.
|
Chris@0
|
17 *
|
Chris@0
|
18 * @param string $name
|
Chris@0
|
19 * The ID of the image style to be deleted.
|
Chris@0
|
20 * @param string $replacement
|
Chris@0
|
21 * The ID of the image style used as replacement.
|
Chris@0
|
22 */
|
Chris@0
|
23 public function setReplacementId($name, $replacement);
|
Chris@0
|
24
|
Chris@0
|
25 /**
|
Chris@0
|
26 * Retrieves the replacement ID of a deleted image style.
|
Chris@0
|
27 *
|
Chris@0
|
28 * The method is retrieving the value stored by ::setReplacementId().
|
Chris@0
|
29 *
|
Chris@0
|
30 * @param string $name
|
Chris@0
|
31 * The ID of the image style to be replaced.
|
Chris@0
|
32 *
|
Chris@0
|
33 * @return string|null
|
Chris@0
|
34 * The ID of the image style used as replacement, if there's any, or NULL.
|
Chris@0
|
35 *
|
Chris@0
|
36 * @see \Drupal\image\ImageStyleStorageInterface::setReplacementId()
|
Chris@0
|
37 */
|
Chris@0
|
38 public function getReplacementId($name);
|
Chris@0
|
39
|
Chris@0
|
40 /**
|
Chris@0
|
41 * Clears a replacement ID from the storage.
|
Chris@0
|
42 *
|
Chris@0
|
43 * The method clears the value previously stored with ::setReplacementId().
|
Chris@0
|
44 *
|
Chris@0
|
45 * @param string $name
|
Chris@0
|
46 * The ID of the image style to be replaced.
|
Chris@0
|
47 *
|
Chris@0
|
48 * @see \Drupal\image\ImageStyleStorageInterface::setReplacementId()
|
Chris@0
|
49 */
|
Chris@0
|
50 public function clearReplacementId($name);
|
Chris@0
|
51
|
Chris@0
|
52 }
|