abstract protected function SwaggerUIFormatterTrait::getSwaggerFileUrlFromField in Swagger UI Field Formatter 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/SwaggerUIFormatterTrait.php \Drupal\swagger_ui_formatter\Plugin\Field\FieldFormatter\SwaggerUIFormatterTrait::getSwaggerFileUrlFromField()
Creates a web-accessible URL to a Swagger file from the field item.
Parameters
\Drupal\Core\Field\FieldItemInterface $field_item: The field item.
array $context: Additional context for creating the URL to the Swagger file.
Return value
string|null URL to the Swagger file or null if the URL could not be created.
1 call to SwaggerUIFormatterTrait::getSwaggerFileUrlFromField()
- SwaggerUIFormatterTrait::buildRenderArray in src/
Plugin/ Field/ FieldFormatter/ SwaggerUIFormatterTrait.php - Builds a render array from a field.
2 methods override SwaggerUIFormatterTrait::getSwaggerFileUrlFromField()
- SwaggerUIFileFormatter::getSwaggerFileUrlFromField in src/
Plugin/ Field/ FieldFormatter/ SwaggerUIFileFormatter.php - Creates a web-accessible URL to a Swagger file from the field item.
- SwaggerUILinkFormatter::getSwaggerFileUrlFromField in src/
Plugin/ Field/ FieldFormatter/ SwaggerUILinkFormatter.php - Creates a web-accessible URL to a Swagger file from the field item.
File
- src/
Plugin/ Field/ FieldFormatter/ SwaggerUIFormatterTrait.php, line 245
Class
- SwaggerUIFormatterTrait
- Provides common methods for Swagger UI field formatters.
Namespace
Drupal\swagger_ui_formatter\Plugin\Field\FieldFormatterCode
protected abstract function getSwaggerFileUrlFromField(FieldItemInterface $field_item, array $context = []) : ?string;