This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_ENTITY_TYPE_presave(). | |
*/ | |
function [modulename]_media_media_presave(EntityInterface $entity) { | |
if ($entity->bundle() == 'document') { | |
foreach ($entity->field_media_file as $file_reference) { | |
$file = File::load($file_reference->target_id); | |
switch ($entity->status->value) { | |
// Unpublish, set to private. | |
case 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config/schema/layout_builder_styles.schema.yml b/config/schema/layout_builder_styles.schema.yml | |
index 3f5976a..02794a4 100644 | |
--- a/config/schema/layout_builder_styles.schema.yml | |
+++ b/config/schema/layout_builder_styles.schema.yml | |
@@ -14,6 +14,9 @@ layout_builder_styles.style.*: | |
type: | |
type: string | |
label: 'Type' | |
+ group: | |
+ type: string |