You are here

public function DefaultTwigExtension::is_started in Opigno training catalog 8

Same name and namespace in other branches
  1. 3.x src/TwigExtension/DefaultTwigExtension.php \Drupal\opigno_catalog\TwigExtension\DefaultTwigExtension::is_started()

Checks if training started.

File

src/TwigExtension/DefaultTwigExtension.php, line 66

Class

DefaultTwigExtension
Class DefaultTwigExtension.

Namespace

Drupal\opigno_catalog\TwigExtension

Code

public function is_started($group_id) {
  $group = Group::load($group_id);
  $account = \Drupal::currentUser();
  return (bool) opigno_learning_path_started($group, $account);
}