You are here

function _tca_extra_field_definitions in Token Content Access 8

Same name and namespace in other branches
  1. 2.0.x tca.module \_tca_extra_field_definitions()

Define etrafields that will be used for storeing settings.

4 calls to _tca_extra_field_definitions()
tca_entity_base_field_info in ./tca.module
Implements hook_entity_base_field_info().
tca_modules_installed in ./tca.module
Implements hook_modules_installed().
tca_module_preuninstall in ./tca.module
Implements hook_module_preuninstall().
tca_update_8101 in ./tca.install
Add the public field to TCA Settings entity.

File

./tca.module, line 79
Contains tca.module.

Code

function _tca_extra_field_definitions() {
  $fields['tca_active'] = BaseFieldDefinition::create('boolean')
    ->setLabel(t('TCA Active'))
    ->setDefaultValue(0)
    ->setStorageRequired(TRUE);
  $fields['tca_public'] = BaseFieldDefinition::create('boolean')
    ->setLabel(t('TCA Public'))
    ->setDefaultValue(0)
    ->setDescription(t('Allows content to be viewed without the "View published content" permission'))
    ->setStorageRequired(TRUE);
  $fields['tca_token'] = BaseFieldDefinition::create('string')
    ->setLabel(t('TCA Token'))
    ->setDefaultValue('')
    ->setStorageRequired(TRUE);
  return $fields;
}