本文整理匯總了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';
}