You are here

function cacheflush_cron_entity_base_field_info in CacheFlush 8

Implements hook_entity_base_field_info().

File

modules/cacheflush_cron/cacheflush_cron.module, line 18
Cacheflush cron module.

Code

function cacheflush_cron_entity_base_field_info(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() == 'cacheflush') {
    $fields = [];
    $fields['cron'] = BaseFieldDefinition::create('boolean')
      ->setLabel(t('Cron entry'))
      ->setDescription(t('Enable cron for cacheflush preset.'))
      ->setDefaultValue(0);
    return $fields;
  }
}