Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grimreaper created an issue. See original summary.

Grimreaper’s picture

Piegefull’s picture

Assigned: Piegefull » Grimreaper
Status: Active » Needs review
FileSize
25.39 KB
Grimreaper’s picture

Status: Needs review » Needs work
  1. +++ b/src/EntityVisibilityPreviewConditionPluginBase.php
    @@ -5,12 +5,57 @@ declare(strict_types = 1);
    +   * @param \Drupal\entity_visibility_preview\Service\SessionManager $session_manager
    

    SessionManagerInterface

  2. +++ b/src/EntityVisibilityPreviewConditionPluginBase.php
    @@ -33,4 +78,32 @@ abstract class EntityVisibilityPreviewConditionPluginBase extends PluginBase imp
    +
    

    Removing empty lines.

  3. +++ b/src/Plugin/EntityVisibilityPreviewCondition/DateRangeCondition.php
    @@ -99,8 +92,8 @@ class DateRangeCondition extends EntityVisibilityPreviewConditionPluginBase impl
           $container->get('datetime.time'),
    

    I will show you how to extend with dependency injection.

Ok, we will optimize the plugin heritage for the dependency injection.

Grimreaper’s picture

Grimreaper’s picture

Grimreaper’s picture

As the pluginBase class do not have a create method we can't use the instance in the "create" method.

  • Piegefull authored a3efa85 on 8.x-1.x
    Issue #3099671 by Grimreaper, Piegefull: Make the preview form/system...
Grimreaper’s picture

Assigned: Grimreaper » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.