Skip to content
Snippets Groups Projects
Commit cda4e7a9 authored by Mingsong's avatar Mingsong
Browse files

Issue #3344449 by Mingsong, DrupalRanger: Uncaught PHP Exception the...

parent edd5ee3e
No related branches found
No related tags found
1 merge request!11Issue #3344449 by Mingsong, DrupalRanger: Uncaught PHP Exception the...
......@@ -91,7 +91,7 @@ class FilterConditionForm extends EntityForm {
$this->entityTypeManager = $entityTypeManager;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
$this->pathCondition = $plugin_factory->createInstance('request_path');
$this->contentTypeCondition = $plugin_factory->createInstance('node_type');
$this->contentTypeCondition = $plugin_factory->createInstance('entity_bundle:node');
$this->fieldTypePluginManager = $field_type_plugin_manager;
$this->fieldTypeManager = $field_type_manager;
$this->cacheTagsInvalidator = $cache_tags_invalidator;
......
......@@ -70,7 +70,7 @@ class TooltipManager {
*/
public function __construct(FactoryInterface $plugin_factory, FieldTypeManager $field_type_manager, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer) {
$this->pathCondition = $plugin_factory->createInstance('request_path');
$this->contentTypeCondition = $plugin_factory->createInstance('node_type');
$this->contentTypeCondition = $plugin_factory->createInstance('entity_bundle:node');
$this->fieldTypeManager = $field_type_manager;
$this->entityTypeManager = $entity_type_manager;
$this->renderer = $renderer;
......
......@@ -3,7 +3,7 @@ description: 'Tooltip information from taxonomy terms'
package: Taxonomy
configure: entity.tooltip_taxonomy.config
type: module
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^9.3 || ^10
dependencies:
- drupal:filter
......
......@@ -32,3 +32,19 @@ function tooltip_taxonomy_update_8101() {
}
}
}
/**
* Updates the node type visibility condition.
*/
function tooltip_taxonomy_update_10001() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory->listAll('tooltip_taxonomy.filter_condition.') as $tooltip_config_name) {
$tooltip = $config_factory->getEditable($tooltip_config_name);
$content_type_setting = $tooltip->get('contentTypes');
if ($content_type_setting && isset($content_type_setting['id'])) {
$content_type_setting['id'] = 'entity_bundle:node';
$tooltip->set('contentTypes', $content_type_setting);
$tooltip->save(TRUE);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment