You are here

function course_entity_property_info_alter in Course 7

Same name and namespace in other branches
  1. 7.2 course.module \course_entity_property_info_alter()

Implements hook_entity_property_info_alter().

Define our special schema fields and relationships.

File

./course.module, line 2840
course.module Core functionality for Courses.

Code

function course_entity_property_info_alter(&$info) {
  $info['node']['properties']['course']['label'] = 'Course';
  $info['node']['properties']['course']['description'] = 'The course associated with this node.';
  $info['node']['properties']['course']['type'] = 'course';
  $info['node']['properties']['course']['schema field'] = 'nid';
  $info['course']['properties']['close']['type'] = 'date';
  $info['course']['properties']['nid']['type'] = 'node';
  $info['course']['properties']['nid']['required'] = TRUE;
  $info['course']['properties']['open']['type'] = 'date';
  $info['course']['properties']['duration']['type'] = 'duration';
  $info['course_enrollment']['properties']['created']['type'] = 'date';
  $info['course_enrollment']['properties']['enroll_end']['type'] = 'date';
  $info['course_enrollment']['properties']['nid']['type'] = 'node';
  $info['course_enrollment']['properties']['nid']['required'] = TRUE;
  $info['course_enrollment']['properties']['timestamp']['type'] = 'date';
  $info['course_enrollment']['properties']['uid']['type'] = 'user';
  $info['course_enrollment']['properties']['uid']['required'] = TRUE;
  $info['course_enrollment']['properties']['type']['type'] = 'course_enrollment_type';
  $info['course_object']['properties']['duration']['type'] = 'duration';
  $info['course_object']['properties']['enabled']['type'] = 'boolean';
  $info['course_object']['properties']['hidden']['type'] = 'boolean';
  $info['course_object']['properties']['nid']['type'] = 'node';
  $info['course_object']['properties']['nid']['required'] = TRUE;
  $info['course_object']['properties']['module']['required'] = TRUE;
  $info['course_object']['properties']['object_type']['required'] = TRUE;
  $info['course_object']['properties']['required']['type'] = 'boolean';
  $info['course_object_fulfillment']['properties']['coid']['type'] = 'course_object';
  $info['course_object_fulfillment']['properties']['complete']['type'] = 'boolean';
  $info['course_object_fulfillment']['properties']['date_completed']['type'] = 'date';
  $info['course_object_fulfillment']['properties']['date_started']['type'] = 'date';
  $info['course_object_fulfillment']['properties']['uid']['type'] = 'user';
  $info['course_object_fulfillment']['properties']['uid']['required'] = TRUE;
  $info['course_report']['properties']['date_completed']['type'] = 'date';
  $info['course_report']['properties']['updated']['type'] = 'date';
  $info['course_report']['properties']['nid']['type'] = 'node';
  $info['course_report']['properties']['uid']['type'] = 'user';
  $info['course_report']['properties']['nid']['required'] = TRUE;
  $info['course_report']['properties']['uid']['required'] = TRUE;
  $info['course_report']['properties']['coid']['type'] = 'course_object';
  $info['course_report']['properties']['complete']['type'] = 'boolean';
}