Signup.php in SendinBlue 8
File
src/Entity/Signup.php
View source
<?php
namespace Drupal\sendinblue\Entity;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
class Signup extends ContentEntityBase {
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields['mcsId'] = BaseFieldDefinition::create('integer')
->setLabel(t('ID'))
->setDescription(t('The ID of the Contact entity.'))
->setReadOnly(TRUE);
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))
->setDescription(t('The name of the Contact entity.'))
->setSettings([
'default_value' => '',
'max_length' => 32,
'text_processing' => 0,
])
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => 1,
])
->setDisplayConfigurable('view', TRUE);
$fields['mcLists'] = BaseFieldDefinition::create('map')
->setLabel(t('settings'))
->setDescription(t('The ID of the Contact entity.'));
$fields['mode'] = BaseFieldDefinition::create('integer')
->setLabel(t('mode'))
->setDescription(t('The ID of the Contact entity.'));
$fields['title'] = BaseFieldDefinition::create('string')
->setLabel(t('Title'))
->setDescription(t('The name of the Contact entity.'))
->setSettings([
'default_value' => '',
'max_length' => 32,
'text_processing' => 0,
])
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => 0,
])
->setDisplayConfigurable('view', TRUE);
$fields['settings'] = BaseFieldDefinition::create('map')
->setLabel(t('settings'))
->setDescription(t('The ID of the Contact entity.'));
$fields['status'] = BaseFieldDefinition::create('integer')
->setLabel(t('status'))
->setDescription(t('The ID of the Contact entity.'))
->setDefaultValue(1);
$fields['module'] = BaseFieldDefinition::create('string')
->setLabel(t('module'))
->setDescription(t('The name of the Contact entity.'));
return $fields;
}
}
Classes
Name |
Description |
Signup |
Defines the Contact entity. |