abstract class FieldMapping in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 src/FieldMapping.php \Drupal\fillpdf\FieldMapping
Represents a mapping between a PDF field and a merge value.
Represents a mapping between a PDF field and a merge value (a value with which to fill in the field). This is a barebones base class intended to be subclassed and enhanced with additional properties and getter methods.
FieldMapping objects are immutable; replace the value by calling the constructor again if the value needs to change.
Hierarchy
- class \Drupal\fillpdf\FieldMapping
Expanded class hierarchy of FieldMapping
2 files declare their use of FieldMapping
- ImageFieldMapping.php in src/
FieldMapping/ ImageFieldMapping.php - TextFieldMapping.php in src/
FieldMapping/ TextFieldMapping.php
File
- src/
FieldMapping.php, line 15
Namespace
Drupal\fillpdfView source
abstract class FieldMapping {
/**
* The primary value of the mapping.
*
* @var string
*/
protected $data;
/**
* Constructs a FieldMapping object.
*
* @param string $data
* String containing the data.
*/
public function __construct($data) {
$this->data = $data;
}
/**
* Returns the data.
*
* @return string
* String containing the data.
*/
public function getData() {
return $this->data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldMapping:: |
protected | property | The primary value of the mapping. | |
FieldMapping:: |
public | function | Returns the data. | |
FieldMapping:: |
public | function | Constructs a FieldMapping object. | 2 |