/**
  * {@inheritdoc}
  */
 public function supportsEnvironmentAndStep(Environment $environment, StepNode $step)
 {
     if (!$environment instanceof ContextEnvironment) {
         return false;
     }
     if (!$environment->hasContexts()) {
         return false;
     }
     return null !== $this->getSnippetAcceptingContextClass($environment);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function supportsEnvironmentAndStep(Environment $environment, StepNode $step)
 {
     if (!$environment instanceof ContextEnvironment) {
         return false;
     }
     if (!$environment->hasContexts()) {
         return false;
     }
     return null !== $this->contextIdentifier->guessTargetContextClass($environment);
 }