Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce entity_usage #453

Open
wants to merge 3 commits into
base: 6.2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"drupal/entity_browser": "2.6",
"drupal/entity_reference_actions": "^1.0-beta5",
"drupal/entity_reference_revisions": "^1.3",
"drupal/entity_usage": "^2.0-beta6",
"drupal/field_group": "3.2",
"drupal/focal_point": "^1.3",
"drupal/facets": "^1.4",
Expand Down
30 changes: 30 additions & 0 deletions config/install/entity_usage.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
track_enabled_base_fields: false
local_task_enabled_entity_types:
- media
- taxonomy_term
usage_controller_items_per_page: 25
track_enabled_source_entity_types:
- node
- media
- taxonomy_term
- user
track_enabled_target_entity_types:
- node
- media
- taxonomy_term
- user
edit_warning_message_entity_types:
- media
delete_warning_message_entity_types:
- media
track_enabled_plugins:
- dynamic_entity_reference
- media_embed
- link
- linkit
- layout_builder
- entity_reference
- entity_embed
- html_link
- block_field
site_domains: { }
3 changes: 3 additions & 0 deletions config/update/thunder_update_8318.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__global_actions:
install_modules:
- entity_usage
1 change: 1 addition & 0 deletions thunder.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ install:
- empty_fields:empty_fields
- entity_reference_actions:entity_reference_actions
- entity_browser:entity_browser_entity_form
- entity_usage:entity_usage
- field_group:field_group
- focal_point:focal_point
- length_indicator:length_indicator
Expand Down
14 changes: 14 additions & 0 deletions thunder.install
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,17 @@ function thunder_update_8317() {
return t('The "Scheduled" menu entry was removed.');
}
}

/**
* Enable the entity_usage module.
*/
function thunder_update_8318() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('thunder', 'thunder_update_8318');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}
8 changes: 8 additions & 0 deletions updates_checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ v6.1.4:
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>We did not automatically update your sitemap config. Add the variants you want to have and the add another variant of type variant_index as the default sitemap.</strong><p>'
configuration_page: { '#text': 'Add variants', '#url': 'internal:/admin/config/search/simplesitemap/variants' }
v6.2.3:
'#title': 'Update to version v6.2.3'
'#description': '<h3>These are the new features for this release:</h3>'
thunder_update_8318:
'#title': 'Enable the entity_usage module.'
'#description': '<p>The entity_usage module enables the editor to see in which articles media items or taxonomy terms are used.</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'