You are here

public function ActivitiesBrowserController::previewActivity in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/Controller/ActivitiesBrowserController.php \Drupal\opigno_module\Controller\ActivitiesBrowserController::previewActivity()

Preview activity.

1 string reference to 'ActivitiesBrowserController::previewActivity'
opigno_module.routing.yml in ./opigno_module.routing.yml
opigno_module.routing.yml

File

src/Controller/ActivitiesBrowserController.php, line 110

Class

ActivitiesBrowserController
Class ActivitiesBrowserController.

Namespace

Drupal\opigno_module\Controller

Code

public function previewActivity($opigno_activity) {
  $build = [];
  $build[] = \Drupal::entityTypeManager()
    ->getViewBuilder('opigno_activity')
    ->view($opigno_activity, 'activity');
  return $build;
}