public function OpignoModuleManagerController::getH5PDescription in Opigno module 8
Same name and namespace in other branches
- 3.x src/Controller/OpignoModuleManagerController.php \Drupal\opigno_module\Controller\OpignoModuleManagerController::getH5PDescription()
Returns H5P description.
1 call to OpignoModuleManagerController::getH5PDescription()
- OpignoModuleManagerController::getActivityTypes in src/
Controller/ OpignoModuleManagerController.php - Get the list of the existing activity types.
File
- src/
Controller/ OpignoModuleManagerController.php, line 455
Class
- OpignoModuleManagerController
- Controller for all the actions of the Opigno module manager.
Namespace
Drupal\opigno_module\ControllerCode
public function getH5PDescription($libTitle) {
$html = NULL;
foreach ($this->H5PActivitiesDetails as $H5PActivityDetail) {
if ($H5PActivityDetail->machine_name == $libTitle) {
$html .= '<p class="summary">' . $H5PActivityDetail->summary . '</p>';
$html .= '<p class="description">' . $H5PActivityDetail->description . '</p>';
$screenshots = json_decode($H5PActivityDetail->screenshots);
if ($screenshots) {
$html .= '<p class="images">';
foreach ($screenshots as $screenshot) {
$html .= '<img src="' . $screenshot->url . '" alt="" />';
}
$html .= '</p>';
}
break;
}
}
return $html;
}