Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce-3380547
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
commerce-3380547
Commits
968a67fd
Commit
968a67fd
authored
6 years ago
by
Bojan Živanović
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3010225
followup: clean up ProductVariationFieldRenderer dependencies.
parent
7d8ab841
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/product/commerce_product.services.yml
+1
-1
1 addition, 1 deletion
modules/product/commerce_product.services.yml
modules/product/src/ProductVariationFieldRenderer.php
+1
-20
1 addition, 20 deletions
modules/product/src/ProductVariationFieldRenderer.php
with
2 additions
and
21 deletions
modules/product/commerce_product.services.yml
+
1
−
1
View file @
968a67fd
...
...
@@ -21,7 +21,7 @@ services:
commerce_product.variation_field_renderer
:
class
:
Drupal\commerce_product\ProductVariationFieldRenderer
arguments
:
[
'
@entity_type.manager'
,
'
@entity_field.manager'
]
arguments
:
[
'
@entity_type.manager'
]
commerce_product.product_route_context
:
class
:
Drupal\commerce_product\ContextProvider\ProductRouteContext
...
...
This diff is collapsed.
Click to expand it.
modules/product/src/ProductVariationFieldRenderer.php
+
1
−
20
View file @
968a67fd
...
...
@@ -6,25 +6,10 @@ use Drupal\commerce_product\Entity\ProductVariationInterface;
use
Drupal\Core\Ajax\AjaxResponse
;
use
Drupal\Core\Ajax\ReplaceCommand
;
use
Drupal\Core\Render\Element
;
use
Drupal\Core\Entity\EntityFieldManagerInterface
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
class
ProductVariationFieldRenderer
implements
ProductVariationFieldRendererInterface
{
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected
$entityTypeManager
;
/**
* The entity field manager.
*
* @var \Drupal\Core\Entity\EntityFieldManagerInterface
*/
protected
$entityFieldManager
;
/**
* The product variation view builder.
*
...
...
@@ -37,12 +22,8 @@ class ProductVariationFieldRenderer implements ProductVariationFieldRendererInte
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
* The entity field manager.
*/
public
function
__construct
(
EntityTypeManagerInterface
$entity_type_manager
,
EntityFieldManagerInterface
$entity_field_manager
)
{
$this
->
entityTypeManager
=
$entity_type_manager
;
$this
->
entityFieldManager
=
$entity_field_manager
;
public
function
__construct
(
EntityTypeManagerInterface
$entity_type_manager
)
{
$this
->
variationViewBuilder
=
$entity_type_manager
->
getViewBuilder
(
'commerce_product_variation'
);
}
...
...
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