protected static function ParagraphViewModeWidget::getParagraphsTypeFromRequest in Paragraph View Mode 8
Same name and namespace in other branches
- 2.x src/Plugin/Field/FieldWidget/ParagraphViewModeWidget.php \Drupal\paragraph_view_mode\Plugin\Field\FieldWidget\ParagraphViewModeWidget::getParagraphsTypeFromRequest()
Get ParagraphsType entity object from request.
Parameters
\Symfony\Component\HttpFoundation\Request $request: Current request object.
Return value
\Drupal\paragraphs\Entity\ParagraphsType|null ParagraphsType entity.
2 calls to ParagraphViewModeWidget::getParagraphsTypeFromRequest()
- ParagraphViewModeWidget::getAvailableViewModes in src/
Plugin/ Field/ FieldWidget/ ParagraphViewModeWidget.php - Getter for available view modes in paragraph entity type.
- ParagraphViewModeWidget::getViewModesFieldDescription in src/
Plugin/ Field/ FieldWidget/ ParagraphViewModeWidget.php - Getter for 'view modes' field description.
File
- src/
Plugin/ Field/ FieldWidget/ ParagraphViewModeWidget.php, line 220
Class
- ParagraphViewModeWidget
- Plugin implementation of the 'paragraph_view_mode' widget.
Namespace
Drupal\paragraph_view_mode\Plugin\Field\FieldWidgetCode
protected static function getParagraphsTypeFromRequest(Request $request) : ?ParagraphsType {
return $request->attributes
->get('paragraphs_type', NULL);
}