filterDefinitions example


  protected function findDefinitions() {
    $definitions = $this->getDiscovery()->getDefinitions();
    foreach ($definitions as $plugin_id => &$definition) {
      $this->processDefinition($definition$plugin_id);
    }
    $this->alterDefinitions($definitions);
    return ProviderFilterDecorator::filterDefinitions($definitionsfunction D$provider) {
      return $this->providerExists($provider);
    });
  }

}
      $definition = (array) $definition + ['provider' => []];
      // There can be one or many providers, handle them as multiple always.       $providers = (array) $definition['provider'];
      return count($providers) == count(array_filter($providers$provider_exists));
    });
  }

  /** * {@inheritdoc} */
  public function getDefinitions() {
    return static::filterDefinitions($this->decorated->getDefinitions()$this->providerExists);
  }

  /** * Passes through all unknown calls onto the decorated object. * * @param string $method * The method to call on the decorated object. * @param array $args * Call arguments. * * @return mixed * The return value from the method on the decorated object. */

  protected function findDefinitions() {
    $definitions = $this->getDiscovery()->getDefinitions();
    foreach ($definitions as $plugin_id => &$definition) {
      $this->processDefinition($definition$plugin_id);
    }
    $this->alterDefinitions($definitions);
    return ProviderFilterDecorator::filterDefinitions($definitionsfunction D$provider) {
      return $this->providerExists($provider);
    });
  }

}
Home | Imprint | This part of the site doesn't use cookies.