You are here

function course_token_list in Course 6

Implements hook_token_list().

File

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

Code

function course_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'node') {
    module_load_install('course');
    $schema = course_schema();
    foreach ($schema['course_node']['fields'] as $key => $value) {
      $tokens['course']["course-{$key}"] = $value['description'];
    }
  }
  return $tokens;
}