public function CourseObjectAccessPluginBase::getObjectOptions in Course 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/CourseObjectAccessPluginBase.php \Drupal\course\Plugin\CourseObjectAccessPluginBase::getObjectOptions()
- 3.x src/Plugin/CourseObjectAccessPluginBase.php \Drupal\course\Plugin\CourseObjectAccessPluginBase::getObjectOptions()
Helper method to get possible objects.
1 call to CourseObjectAccessPluginBase::getObjectOptions()
- CourseObjectAccessConditional::optionsForm in src/
Plugin/ course/ CourseObjectAccess/ CourseObjectAccessConditional.php
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 22
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
->getId() != $this
->getCourseObject()
->getId()) {
$options[$courseObject
->getId()] = $courseObject
->getTitle();
}
}
return $options;
}