You are here

class EntityExtraFieldInfo in Payment 8.2

Same name in this branch
  1. 8.2 modules/payment_reference/src/Hook/EntityExtraFieldInfo.php \Drupal\payment_reference\Hook\EntityExtraFieldInfo
  2. 8.2 modules/payment_form/src/Hook/EntityExtraFieldInfo.php \Drupal\payment_form\Hook\EntityExtraFieldInfo

Implements hook_entity_extra_field_info().

Hierarchy

Expanded class hierarchy of EntityExtraFieldInfo

See also

payment_form_entity_extra_field_info()

1 file declares its use of EntityExtraFieldInfo
EntityExtraFieldInfoTest.php in modules/payment_form/tests/src/Unit/Hook/EntityExtraFieldInfoTest.php
1 string reference to 'EntityExtraFieldInfo'
payment_form.services.yml in modules/payment_form/payment_form.services.yml
modules/payment_form/payment_form.services.yml
1 service uses EntityExtraFieldInfo
payment_form.hook.entity_extra_field_info in modules/payment_form/payment_form.services.yml
Drupal\payment_form\Hook\EntityExtraFieldInfo

File

modules/payment_form/src/Hook/EntityExtraFieldInfo.php, line 13

Namespace

Drupal\payment_form\Hook
View source
class EntityExtraFieldInfo {
  use StringTranslationTrait;

  /**
   * Constructs a new instance.
   *
   * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
   */
  public function __construct(TranslationInterface $string_translation) {
    $this->stringTranslation = $string_translation;
  }

  /**
   * Invokes the implementation.
   */
  public function invoke() {
    $fields['payment']['payment_form']['form'] = [
      'payment_method' => [
        'label' => $this
          ->t('Payment method selection and configuration'),
        'weight' => 1,
      ],
    ];
    return $fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityExtraFieldInfo::invoke public function Invokes the implementation.
EntityExtraFieldInfo::__construct public function Constructs a new instance.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.