Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerceg
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
commerceg
Commits
c20c8783
Commit
c20c8783
authored
1 year ago
by
Dimitris Bozelos
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3422808
Use relation type manager instead of enabler manager
parent
1f67ff4d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/product/commerceg_product.module
+4
-6
4 additions, 6 deletions
modules/product/commerceg_product.module
with
4 additions
and
6 deletions
modules/product/commerceg_product.module
+
4
−
6
View file @
c20c8783
...
...
@@ -17,29 +17,27 @@ use Drupal\Core\Entity\EntityInterface;
/**
* Implements hook_ENTITY_TYPE_insert().
*
* Clear the cached group
content enabler
plugin definitions when a new product
* Clear the cached group
relation type
plugin definitions when a new product
* type is created so that it can be recognized without having to rebuild
* caches.
*/
function
commerceg_product_commerce_product_type_insert
(
ProductTypeInterface
$product_type
)
{
\Drupal
::
service
(
'plugin.manager.group_content_enabler'
)
->
clearCachedDefinitions
();
\Drupal
::
service
(
'group_relation_type.manager'
)
->
clearCachedDefinitions
();
}
/**
* Implements hook_ENTITY_TYPE_delete().
*
* Clear the cached group
content enabler
plugin definitions when an existing
* Clear the cached group
relation type
plugin definitions when an existing
* product type is deleted so that it can be removed from the available plugins
* without having to rebuild caches.
*/
function
commerceg_product_commerce_product_type_delete
(
ProductTypeInterface
$product_type
)
{
\Drupal
::
service
(
'plugin.manager.group_content_enabler'
)
->
clearCachedDefinitions
();
\Drupal
::
service
(
'group_relation_type.manager'
)
->
clearCachedDefinitions
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment