function CourseObject::getTitle in Course 7
Same name and namespace in other branches
- 6 includes/course_object.core.inc \CourseObject::getTitle()
- 7.2 includes/CourseObject.inc \CourseObject::getTitle()
4 calls to CourseObject::getTitle()
- CourseObject::buildContent in includes/CourseObject.inc 
- Builds a structured array representing the entity's content.
- CourseObject::optionsForm in includes/CourseObject.inc 
- Default options form for all course objects.
- CourseObject::save in includes/CourseObject.inc 
- Let objects create their instances before saving the course object.
- CourseObjectNode::getTitle in includes/CourseObjectNode.inc 
- Get the object title, or return this object's node's title if the option is set.
1 method overrides CourseObject::getTitle()
- CourseObjectNode::getTitle in includes/CourseObjectNode.inc 
- Get the object title, or return this object's node's title if the option is set.
File
- includes/CourseObject.inc, line 872 
Class
- CourseObject
- Parent abstract base class of all course objects.
Code
function getTitle() {
  $object_info = course_get_handlers('object');
  // If title is not specified, set title from component.
  if (!$this
    ->getOption('title')) {
    // Get the component name from object info.
    $title = $object_info[$this
      ->getOption('module')][$this
      ->getOption('object_type')]['name'];
    $this
      ->setOption('title', $title);
  }
  return $this
    ->getOption('title');
}