You are here

final class TextFieldMapping in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x src/FieldMapping/TextFieldMapping.php \Drupal\fillpdf\FieldMapping\TextFieldMapping

Represents a mapping between a PDF text field and a merge value.

TextFieldMapping objects are immutable; replace the value by calling the constructor again if the value needs to change.

Hierarchy

Expanded class hierarchy of TextFieldMapping

8 files declare their use of TextFieldMapping
BackendProxy.php in src/Service/BackendProxy.php
FillPdfServicePdfBackend.php in src/Plugin/PdfBackend/FillPdfServicePdfBackend.php
LegacyProviderPdfBackend.php in modules/fillpdf_legacy/src/Plugin/PdfBackend/LegacyProviderPdfBackend.php
LocalServerPdfBackend.php in src/Plugin/PdfBackend/LocalServerPdfBackend.php
PdfPopulationTest.php in tests/src/Functional/PdfPopulationTest.php

... See full list

File

src/FieldMapping/TextFieldMapping.php, line 13

Namespace

Drupal\fillpdf\FieldMapping
View source
final class TextFieldMapping extends FieldMapping {

  /**
   * Constructs an TextFieldMapping object.
   *
   * @param string $data
   *   String containing the text data.
   */
  public function __construct($data) {

    // Ensure data is a string.
    parent::__construct((string) $data);
  }

  /**
   * Return parent::getData().
   *
   * @return string
   *   The return value of parent::getData().
   */
  public function __toString() {
    return parent::getData();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FieldMapping::$data protected property The primary value of the mapping.
FieldMapping::getData public function Returns the data.
TextFieldMapping::__construct public function Constructs an TextFieldMapping object. Overrides FieldMapping::__construct
TextFieldMapping::__toString public function Return parent::getData().