public static function PaymentLineItemsInput::getLineItems in Payment 8.2
Retrieves the line items from the form's state.
Parameters
mixed[] $element:
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
\Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface[]
8 calls to PaymentLineItemsInput::getLineItems()
- PaymentLineItemElement::submitForm in modules/
payment_test/ src/ PaymentLineItemElement.php - Form submission handler.
- PaymentLineItemsInput::addMoreSubmit in src/
Element/ PaymentLineItemsInput.php - Implements form #submit callback.
- PaymentLineItemsInput::deleteSubmit in src/
Element/ PaymentLineItemsInput.php - Implements form #submit callback.
- PaymentLineItemsInput::lineItemExists in src/
Element/ PaymentLineItemsInput.php - Checks if a line item name already exists.
- PaymentLineItemsInput::process in src/
Element/ PaymentLineItemsInput.php - Implements form #process callback.
File
- src/
Element/ PaymentLineItemsInput.php, line 373
Class
- PaymentLineItemsInput
- Provides a payment line items configuration element.
Namespace
Drupal\payment\ElementCode
public static function getLineItems(array $element, FormStateInterface $form_state) {
$key = 'payment.element.payment_line_items_input.configured.' . $element['#name'];
return $form_state
->has($key) ? $form_state
->get($key) : [];
}