interface WebformAttachmentInterface in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_attachment/src/Element/WebformAttachmentInterface.php \Drupal\webform_attachment\Element\WebformAttachmentInterface
Provides an interface for webform attachment elements.
Hierarchy
- interface \Drupal\webform_attachment\Element\WebformAttachmentInterface
Expanded class hierarchy of WebformAttachmentInterface
All classes that implement WebformAttachmentInterface
File
- modules/
webform_attachment/ src/ Element/ WebformAttachmentInterface.php, line 10
Namespace
Drupal\webform_attachment\ElementView source
interface WebformAttachmentInterface {
/**
* Get a webform attachment's file name.
*
* @param array $element
* The webform attachment element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return mixed|string
* The attachment's file name.
*/
public static function getFileName(array $element, WebformSubmissionInterface $webform_submission);
/**
* Get a webform attachment's file content.
*
* @param array $element
* The webform attachment element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return mixed|string
* The attachment's file content.
*/
public static function getFileContent(array $element, WebformSubmissionInterface $webform_submission);
/**
* Get a webform attachment's file type.
*
* @param array $element
* The webform attachment element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return mixed|string
* The attachment's file type.
*/
public static function getFileMimeType(array $element, WebformSubmissionInterface $webform_submission);
/**
* Get a webform attachment's download URL.
*
* @param array $element
* The webform attachment element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return \Drupal\Core\Url|null
* A webform attachment's download URL. Return NULL if the submission is
* not saved to the database.
*/
public static function getFileUrl(array $element, WebformSubmissionInterface $webform_submission);
/**
* Get a webform attachment's file link.
*
* @param array $element
* The webform attachment element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return array
* A renderable array containing a link to the webform attachment's URL.
*/
public static function getFileLink(array $element, WebformSubmissionInterface $webform_submission);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformAttachmentInterface:: |
public static | function | Get a webform attachment's file content. | 4 |
WebformAttachmentInterface:: |
public static | function | Get a webform attachment's file link. | 1 |
WebformAttachmentInterface:: |
public static | function | Get a webform attachment's file type. | 1 |
WebformAttachmentInterface:: |
public static | function | Get a webform attachment's file name. | 1 |
WebformAttachmentInterface:: |
public static | function | Get a webform attachment's download URL. | 1 |