public function OpignoModuleManagerController::getActivityPreview in Opigno module 8
Same name and namespace in other branches
- 3.x src/Controller/OpignoModuleManagerController.php \Drupal\opigno_module\Controller\OpignoModuleManagerController::getActivityPreview()
Returns activity preview.
1 string reference to 'OpignoModuleManagerController::getActivityPreview'
File
- src/
Controller/ OpignoModuleManagerController.php, line 98
Class
- OpignoModuleManagerController
- Controller for all the actions of the Opigno module manager.
Namespace
Drupal\opigno_module\ControllerCode
public function getActivityPreview(OpignoActivity $opigno_activity) {
$view_builder = \Drupal::entityTypeManager()
->getViewBuilder($opigno_activity
->getEntityTypeId());
return $view_builder
->view($opigno_activity, 'activity');
}