You are here

function CourseObjectAccessConditional::see in Course 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/course/CourseObjectAccess/CourseObjectAccessConditional.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessConditional::see()
  2. 3.x src/Plugin/course/CourseObjectAccess/CourseObjectAccessConditional.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessConditional::see()

Overrides CourseObjectAccessPluginBase::see

File

src/Plugin/course/CourseObjectAccess/CourseObjectAccessConditional.php, line 20

Class

CourseObjectAccessConditional
Plugin annotation @CourseObjectAccess( id = "conditional", label = @Translation("Conditional"), )

Namespace

Drupal\course\Plugin\course\CourseObjectAccess

Code

function see($account) {
  if ($this
    ->getOption('conditional_hidden')) {
    return $this
      ->view($account);
  }
}