You are here

function cacheflush_ui_entity_base_field_info in CacheFlush 8

Implements hook_entity_base_field_info().

File

modules/cacheflush_ui/cacheflush_ui.module, line 38
Cacheflush User Interface.

Code

function cacheflush_ui_entity_base_field_info(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() == 'cacheflush') {
    $fields = [];
    $fields['menu'] = BaseFieldDefinition::create('boolean')
      ->setLabel(t('Menu entry'))
      ->setDescription(t('Menu for Cacheflush entity.'))
      ->setDefaultValue(0);
    return $fields;
  }
}