mollie_payment.module in Mollie Payment 8.2
Same filename and directory in other branches
Provides Mollie integration for the Payment platform.
File
mollie_payment.moduleView source
<?php
/**
* @file
* Provides Mollie integration for the Payment platform.
*
*/
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;
/**
* Implements hook_entity_base_field_info().
*
* We need an additional field for each payment to store the Mollie payment id.
*/
function mollie_payment_entity_base_field_info(EntityTypeInterface $entity_type) {
if ($entity_type
->id() == 'payment') {
$fields = [];
$fields['mollie_payment_id'] = BaseFieldDefinition::create('string')
->setLabel(t('Mollie payment id'))
->setDescription(t('The payment id in Mollie.'))
->setReadOnly(TRUE);
return $fields;
}
}
Functions
Name | Description |
---|---|
mollie_payment_entity_base_field_info | Implements hook_entity_base_field_info(). |