public function ContentTypeILT::getContentFromRequest in Opigno Instructor-led Trainings 3.x
Same name and namespace in other branches
- 8 src/Plugin/OpignoGroupManagerContentType/ContentTypeILT.php \Drupal\opigno_ilt\Plugin\OpignoGroupManagerContentType\ContentTypeILT::getContentFromRequest()
Try to get the content from a Request object.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request object.
Return value
LearningPathContent|false The content if possible. FALSE otherwise.
Overrides ContentTypeInterface::getContentFromRequest
File
- src/
Plugin/ OpignoGroupManagerContentType/ ContentTypeILT.php, line 115
Class
- ContentTypeILT
- Class ContentTypeILT.
Namespace
Drupal\opigno_ilt\Plugin\OpignoGroupManagerContentTypeCode
public function getContentFromRequest(Request $request) {
$entity = $request
->get('opigno_ilt');
if ($entity === NULL || $entity === FALSE) {
return FALSE;
}
return $this
->getContent($entity);
}