public function ContentTypeMeeting::getContent in Opigno Moxtra 3.x
Same name and namespace in other branches
- 8 src/Plugin/OpignoGroupManagerContentType/ContentTypeMeeting.php \Drupal\opigno_moxtra\Plugin\OpignoGroupManagerContentType\ContentTypeMeeting::getContent()
Parameters
int|\Drupal\opigno_moxtra\Entity\Meeting $meeting: The entity ID or entity instance.
Overrides ContentTypeInterface::getContent
2 calls to ContentTypeMeeting::getContent()
- ContentTypeMeeting::getAllContents in src/
Plugin/ OpignoGroupManagerContentType/ ContentTypeMeeting.php - Get all the entities in an array of LearningPathContent.
- ContentTypeMeeting::getContentFromRequest in src/
Plugin/ OpignoGroupManagerContentType/ ContentTypeMeeting.php - Try to get the content from a Request object.
File
- src/
Plugin/ OpignoGroupManagerContentType/ ContentTypeMeeting.php, line 82
Class
- ContentTypeMeeting
- Class ContentTypeMeeting.
Namespace
Drupal\opigno_moxtra\Plugin\OpignoGroupManagerContentTypeCode
public function getContent($meeting) {
// If the value is the meeting ID, load the meeting.
if (is_numeric($meeting)) {
/** @var \Drupal\opigno_moxtra\MeetingInterface $meeting */
$meeting = Meeting::load($meeting);
}
if ($meeting === NULL || $meeting === FALSE) {
return FALSE;
}
return new OpignoGroupContent($this
->getPluginId(), $this
->getEntityType(), $meeting
->id(), $meeting
->label(), $this
->getDefaultModuleImageUrl(), t('Default image'));
}