Added fields to bank account entity
This commit is contained in:
parent
eee7604440
commit
4285e1952f
@ -165,7 +165,6 @@ class OCBankAccount extends ContentEntityBase implements OCBankAccountInterface
|
|||||||
|
|
||||||
$fields['name'] = BaseFieldDefinition::create('string')
|
$fields['name'] = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Name'))
|
->setLabel(t('Name'))
|
||||||
->setDescription(t('The name of the Bank Account entity.'))
|
|
||||||
->setSettings([
|
->setSettings([
|
||||||
'max_length' => 50,
|
'max_length' => 50,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
@ -184,11 +183,52 @@ class OCBankAccount extends ContentEntityBase implements OCBankAccountInterface
|
|||||||
->setDisplayConfigurable('view', TRUE)
|
->setDisplayConfigurable('view', TRUE)
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['status']->setDescription(t('A boolean indicating whether the Bank Account is published.'))
|
$fields['account_number'] = BaseFieldDefinition::create('string')
|
||||||
->setDisplayOptions('form', [
|
->setLabel(t('Account Number'))
|
||||||
'type' => 'boolean_checkbox',
|
->setSettings([
|
||||||
|
'max_length' => 50,
|
||||||
|
'text_processing' => 0,
|
||||||
|
])
|
||||||
|
->setDefaultValue('')
|
||||||
|
->setDisplayOptions('view', [
|
||||||
|
'label' => 'above',
|
||||||
|
'type' => 'string',
|
||||||
'weight' => -3,
|
'weight' => -3,
|
||||||
]);
|
])
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'string_textfield',
|
||||||
|
'weight' => -3,
|
||||||
|
])
|
||||||
|
->setDisplayConfigurable('form', TRUE)
|
||||||
|
->setDisplayConfigurable('view', TRUE)
|
||||||
|
->setRequired(TRUE);
|
||||||
|
|
||||||
|
$fields['sort_code'] = BaseFieldDefinition::create('string')
|
||||||
|
->setLabel(t('Sort Code'))
|
||||||
|
->setSettings([
|
||||||
|
'max_length' => 50,
|
||||||
|
'text_processing' => 0,
|
||||||
|
])
|
||||||
|
->setDefaultValue('')
|
||||||
|
->setDisplayOptions('view', [
|
||||||
|
'label' => 'above',
|
||||||
|
'type' => 'string',
|
||||||
|
'weight' => -2,
|
||||||
|
])
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'string_textfield',
|
||||||
|
'weight' => -2,
|
||||||
|
])
|
||||||
|
->setDisplayConfigurable('form', TRUE)
|
||||||
|
->setDisplayConfigurable('view', TRUE)
|
||||||
|
->setRequired(TRUE);
|
||||||
|
|
||||||
|
$fields['status']->setDescription(t('A boolean indicating whether the Bank Account is published.'))
|
||||||
|
//->setDisplayOptions('form', [
|
||||||
|
// 'type' => 'boolean_checkbox',
|
||||||
|
// 'weight' => -1,
|
||||||
|
//])
|
||||||
|
;
|
||||||
|
|
||||||
$fields['created'] = BaseFieldDefinition::create('created')
|
$fields['created'] = BaseFieldDefinition::create('created')
|
||||||
->setLabel(t('Created'))
|
->setLabel(t('Created'))
|
||||||
|
Reference in New Issue
Block a user