本文整理汇总了PHP中Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter::getConverter方法的典型用法代码示例。如果您正苦于以下问题:PHP ParamConverter::getConverter方法的具体用法?PHP ParamConverter::getConverter怎么用?PHP ParamConverter::getConverter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter
的用法示例。
在下文中一共展示了ParamConverter::getConverter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: supports
/**
* 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: supports
/**
* {@inheritdoc}
*/
public function supports(ParamConverter $configuration)
{
if (!$configuration instanceof ParamConverter) {
return false;
}
if ('badge_converter' === $configuration->getConverter()) {
return true;
}
return false;
}
示例3: supports
/**
* @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: supports
/**
* {@inheritdoc}
*/
public function supports(ParamConverter $configuration)
{
return $configuration->getConverter() == 'ZoneConverter';
}
示例5: supports
/**
* {@inheritDoc}
*/
public function supports(ParamConverter $configuration)
{
return $configuration->getConverter() === 'current_user';
}