You are here

function faqfield_field_storage_config_create in FAQ Field 8

Same name and namespace in other branches
  1. 2.0.x faqfield.module \faqfield_field_storage_config_create()

Implements hook_field_storage_config_create().

Set the default cardinality to unlimited after a faqfield was created.

File

./faqfield.module, line 173
Defines a field for frequently asked questions.

Code

function faqfield_field_storage_config_create(FieldStorageConfigInterface $field_storage) {
  if ($field_storage
    ->getType() == 'faqfield') {
    $field_storage
      ->setCardinality(FieldStorageConfigInterface::CARDINALITY_UNLIMITED);
  }
}