You are here

public static function Test::getParseResult in FillPDF 8.4

Returns a list of fields, as if a PDF file was parsed.

Note that there is a duplicate field that get consolidated in InputHelper::attachPdfToForm() at the latest. The expected number of fields is therefore three, not four.

Return value

array List of associative arrays representing fields.

See also

\Drupal\fillpdf\InputHelper::attachPdfToForm()

1 call to Test::getParseResult()
Test::parse in tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php
Parse a PDF and return a list of its fields.

File

tests/modules/fillpdf_test/src/Plugin/BackendService/Test.php, line 89

Class

Test
Backend used in tests.

Namespace

Drupal\fillpdf_test\Plugin\BackendService

Code

public static function getParseResult() {
  return [
    0 => [
      'name' => 'ImageField',
      'value' => '',
      'type' => 'Pushbutton',
    ],
    1 => [
      'name' => 'TestButton',
      'value' => '',
      'type' => 'Pushbutton',
    ],
    2 => [
      'name' => 'TextField1',
      'value' => '',
      'type' => 'Text',
    ],
    3 => [
      'name' => 'TextField2',
      'value' => '',
      'type' => 'Text',
    ],
    4 => [
      'name' => 'ImageField',
      'value' => '',
      'type' => 'Pushbutton',
    ],
  ];
}