You are here

protected function ImportTrainingForm::fieldColections in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Form/ImportTrainingForm.php \Drupal\opigno_module\Form\ImportTrainingForm::fieldColections()

List of fields.

Parameters

string $type: Entity type.

Return value

array

1 call to ImportTrainingForm::fieldColections()
ImportTrainingForm::buildEntityOptions in src/Form/ImportTrainingForm.php
Build Array of settings to create entity.

File

src/Form/ImportTrainingForm.php, line 616

Class

ImportTrainingForm
Import Course form.

Namespace

Drupal\opigno_module\Form

Code

protected function fieldColections($type) {
  switch ($type) {
    case 'learning_path':
      return [
        'langcode',
        'label',
        'field_guided_navigation',
        'field_learning_path_enable_forum',
        'field_learning_path_published',
        'field_learning_path_visibility',
        'field_learning_path_duration',
        'field_requires_validation',
        'field_learning_path_description',
      ];
    case 'opigno_course':
      return [
        'langcode',
        'label',
        'badge_active',
        'badge_criteria',
        'field_guided_navigation',
        'badge_name',
        'badge_description',
        'field_course_description',
      ];
    case 'opigno_module':
      return [
        'langcode',
        'name',
        'status',
        'random_activity_score',
        'allow_resume',
        'backwards_navigation',
        'randomization',
        'random_activities',
        'takes',
        'show_attempt_stats',
        'keep_results',
        'hide_results',
        'badge_active',
        'badge_criteria',
        'badge_name',
        'badge_description',
        'description',
      ];
  }
}