protected function CalendarEventEmbeddedWidget::getItemFormDisplay in Opigno calendar event 8
Same name in this branch
- 8 src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::getItemFormDisplay()
- 8 src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::getItemFormDisplay()
Same name and namespace in other branches
- 3.x src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::getItemFormDisplay()
Returns the form display for the specified subform item.
Parameters
array $form: The parent form array.
\Drupal\Core\Form\FormStateInterface $form_state: The parent form state.
int $delta: The item delta.
Return value
\Drupal\Core\Entity\Display\EntityFormDisplayInterface An entity form display object.
1 call to CalendarEventEmbeddedWidget::getItemFormDisplay()
- CalendarEventEmbeddedWidget::alterForm in src/
Form/ CalendarEventEmbeddedWidget.php - Alters the parent form.
File
- src/
Form/ CalendarEventEmbeddedWidget.php, line 314
Class
- CalendarEventEmbeddedWidget
- Provides a widget to attach a calendar event to an entity.
Namespace
Drupal\opigno_calendar_event\FormCode
protected function getItemFormDisplay(array $form, FormStateInterface $form_state, $delta) {
$widget_state =& $this
->getWidgetState($form, $form_state);
$item_state =& $widget_state['items'][$delta];
if (!isset($item_state['form_display'])) {
$entity = $widget_state['items'][$delta]['entity'];
$widget_state['items'][$delta]['form_display'] = EntityFormDisplay::collectRenderDisplay($entity, 'embedded_widget');
}
return $item_state['form_display'];
}