You are here

PaymentReferenceItemList.php in Payment 8.2

File

modules/payment_reference/src/Plugin/Field/FieldType/PaymentReferenceItemList.php
View source
<?php

namespace Drupal\payment_reference\Plugin\Field\FieldType;

use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\Core\Form\FormStateInterface;

/**
 * Provides a payment reference field item list.
 *
 * This class removes the functionality to add a default value through the user
 * interface.
 */
class PaymentReferenceItemList extends EntityReferenceFieldItemList {

  /**
   * {@inheritdoc}
   */
  public function defaultValuesForm(array &$form, FormStateInterface $form_state) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function defaultValuesFormValidate(array $element, array &$form, FormStateInterface $form_state) {
  }

  /**
   * {@inheritdoc}
   */
  public function defaultValuesFormSubmit(array $element, array &$form, FormStateInterface $form_state) {
  }

}

Classes

Namesort descending Description
PaymentReferenceItemList Provides a payment reference field item list.