diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php index fae3923..5dbec35 100644 --- a/core/modules/config/src/Tests/ConfigSchemaTest.php +++ b/core/modules/config/src/Tests/ConfigSchemaTest.php @@ -166,6 +166,9 @@ function testSchemaMapping() { $expected['mapping']['effects']['sequence'][0]['mapping']['data']['type'] = 'image.effect.[%parent.id]'; $expected['mapping']['effects']['sequence'][0]['mapping']['weight']['type'] = 'integer'; $expected['mapping']['effects']['sequence'][0]['mapping']['uuid']['type'] = 'string'; + $expected['mapping']['third_party_settings']['type'] = 'sequence'; + $expected['mapping']['third_party_settings']['label'] = 'Third party settings'; + $expected['mapping']['third_party_settings']['sequence'][0]['type'] = 'image_style.third_party.[%key]'; $expected['type'] = 'image.style.*'; $this->assertEqual($definition, $expected); diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml index 4f1fc79..88075cf 100644 --- a/core/modules/image/config/schema/image.schema.yml +++ b/core/modules/image/config/schema/image.schema.yml @@ -22,6 +22,11 @@ image.style.*: type: integer uuid: type: string + third_party_settings: + type: sequence + label: 'Third party settings' + sequence: + - type: image_style.third_party.[%key] image.effect.image_crop: type: image_size diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index 4506891..8d6e3dd 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -9,6 +9,8 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Config\Entity\ThirdPartySettingsInterface; +use Drupal\Core\Config\Entity\ThirdPartySettingsTrait; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\Core\Routing\RequestHelper; @@ -48,7 +50,9 @@ * } * ) */ -class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, EntityWithPluginBagsInterface { +class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, EntityWithPluginBagsInterface, ThirdPartySettingsInterface { + + use ThirdPartySettingsTrait; /** * The name of the image style to use as replacement upon delete.