You are here

function CourseObjectNode::Xaccess 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::Xaccess()
  2. 3.x modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::Xaccess()

Deny access to objects without content.

@todo conflicts with core D8

File

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

Class

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

Namespace

Drupal\course_content\Course\Object

Code

function Xaccess($op = 'view', $account = NULL) {
  if ($op == 'take' && !$this
    ->getNode()) {
    return FALSE;
  }
  return parent::access($op, $account);
}