You are here

public function OpignoModuleManagerController::getActivityPreview in Opigno module 3.x

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

Returns activity preview.

1 string reference to 'OpignoModuleManagerController::getActivityPreview'
opigno_module.routing.yml in ./opigno_module.routing.yml
opigno_module.routing.yml

File

src/Controller/OpignoModuleManagerController.php, line 98

Class

OpignoModuleManagerController
Controller for all the actions of the Opigno module manager.

Namespace

Drupal\opigno_module\Controller

Code

public function getActivityPreview(OpignoActivity $opigno_activity) {
  $view_builder = \Drupal::entityTypeManager()
    ->getViewBuilder($opigno_activity
    ->getEntityTypeId());
  return $view_builder
    ->view($opigno_activity, 'activity');
}