You are here

function CourseObjectWebform::getOptionsSummary in Course 8.2

Same name and namespace in other branches
  1. 8.3 modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebform::getOptionsSummary()
  2. 3.x modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebform::getOptionsSummary()

Get core options summary.

Return value

array An associative array of summary keys and values.

Overrides CourseObject::getOptionsSummary

File

modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php, line 107

Class

CourseObjectWebform
Plugin annotation @CourseObject( id = "webform", label = "Webform", handlers = { "fulfillment" = "\Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebformFulfillment" } )

Namespace

Drupal\course_webform\Plugin\course\CourseObject

Code

function getOptionsSummary() {
  $summary = parent::getOptionsSummary();
  if ($this
    ->getInstanceId()) {
    $link = Link::createFromRoute(t('Edit questions'), 'entity.webform.edit_form', [
      'webform' => $this
        ->getInstanceId(),
    ])
      ->toString();
    $summary['questions'] = $link;
  }
  return $summary;
}