public function OpignoModule::getKeepResultsOption in Opigno module 8
Same name and namespace in other branches
- 3.x src/Entity/OpignoModule.php \Drupal\opigno_module\Entity\OpignoModule::getKeepResultsOption()
Get option to know which result need to be saved on Database.
Return value
string Return string "best", "newest" or "all"
1 call to OpignoModule::getKeepResultsOption()
- OpignoModule::getUserScore in src/
Entity/ OpignoModule.php - Implements opigno_module_get_user_module_score().
File
- src/
Entity/ OpignoModule.php, line 790
Class
- OpignoModule
- Defines the Module entity.
Namespace
Drupal\opigno_module\EntityCode
public function getKeepResultsOption() {
$keep_results_options = [
0 => 'best',
1 => 'newest',
2 => 'all',
];
$option = $this
->get('keep_results')->value;
return $keep_results_options[$option];
}