You are here

public function CourseObjectBook::create in Course 6

Same name and namespace in other branches
  1. 7.2 modules/course_book/course_book.classes.inc \CourseObjectBook::create()
  2. 7 modules/course_book/course_book.classes.inc \CourseObjectBook::create()

Make the book.

Overrides CourseObjectNode::create

File

modules/course_book/course_book.classes.inc, line 12

Class

CourseObjectBook

Code

public function create() {
  $node = new stdClass();
  $node->type = $this
    ->getComponent();
  $node->title = $this
    ->getTitle();
  $node->uid = $this->user->uid;
  $node->book['bid'] = 'new';
  node_save($node);
  $this
    ->setNode($node);
}