You are here

function CourseObjectNode::getWarnings in Course 8.2

Same name and namespace in other branches
  1. 8.3 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::getWarnings()
  2. 3.x modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::getWarnings()

Show a warning if this object has an instance, but the node does not exist.

Overrides CourseHandler::getWarnings

File

modules/course_content/src/Course/Object/CourseObjectNode.php, line 418

Class

CourseObjectNode
A course object that uses a node as a base.

Namespace

Drupal\course_content\Course\Object

Code

function getWarnings() {
  $warnings = parent::getWarnings();
  if ($this
    ->getInstanceId() && !$this
    ->getNode()) {
    $warnings[] = t('The content associated with this object has been deleted.<br/>Saving the course will create new content from the object settings.');
  }
  return $warnings;
}