コード例 #1
0
 /**
  * Checks if the object is supported.
  *
  * @param ParamConverter $configuration Should be an instance of ParamConverter
  *
  * @return bool True if the object is supported, else false
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getConverter()) {
         return false;
     }
     return 'drupal.router_item' === $configuration->getConverter();
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     if (!$configuration instanceof ParamConverter) {
         return false;
     }
     if ('badge_converter' === $configuration->getConverter()) {
         return true;
     }
     return false;
 }
コード例 #3
0
 /**
  * @param ParamConverter $configuration
  *
  * @return bool
  */
 public function supports(ParamConverter $configuration)
 {
     if ("kunstmaan_extra.page" !== $configuration->getConverter()) {
         return false;
     }
     $options = $this->getOptions($configuration);
     if ($options['type_field']) {
         // we will guess the class name later in the `apply` method
         // for now assume it is supported
         return true;
     }
     $configuration->setClass($this->contentType->getContentTypeClass($configuration->getName()));
     return parent::supports($configuration);
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     return $configuration->getConverter() == 'ZoneConverter';
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     return $configuration->getConverter() == 'inspection_request';
 }
コード例 #6
0
 /**
  * {@inheritDoc}
  */
 public function supports(ParamConverter $configuration)
 {
     return $configuration->getConverter() === 'current_user';
 }