public function CourseObjectAccessPluginBase::getObjectOptions in Course 3.x
Same name and namespace in other branches
- 8.3 src/Plugin/CourseObjectAccessPluginBase.php \Drupal\course\Plugin\CourseObjectAccessPluginBase::getObjectOptions()
- 8.2 src/Plugin/CourseObjectAccessPluginBase.php \Drupal\course\Plugin\CourseObjectAccessPluginBase::getObjectOptions()
Helper method to get possible objects.
1 call to CourseObjectAccessPluginBase::getObjectOptions()
- CourseObjectAccessConditional::buildConfigurationForm in src/
Plugin/ course/ CourseObjectAccess/ CourseObjectAccessConditional.php - Define the form to be used in the object access settings area.
1 method overrides CourseObjectAccessPluginBase::getObjectOptions()
- CourseObjectAccessGrade::getObjectOptions in src/
Plugin/ course/ CourseObjectAccess/ CourseObjectAccessGrade.php - Helper method to get possible graded objects.
File
- src/
Plugin/ CourseObjectAccessPluginBase.php, line 25
Class
- CourseObjectAccessPluginBase
- Base class for Course object access plugins.
Namespace
Drupal\course\PluginCode
public function getObjectOptions() {
$options = array(
'',
);
foreach ($this
->getCourseObject()
->getCourse()
->getObjects() as $courseObject) {
if ($courseObject
->id() != $this
->getCourseObject()
->id()) {
$options[$courseObject
->id()] = $courseObject
->getTitle();
}
}
return $options;
}