public function CalendarEventEmbeddedWidget::getItemState in Opigno calendar event 8
Same name in this branch
- 8 src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::getItemState()
- 8 src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::getItemState()
Same name and namespace in other branches
- 3.x src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::getItemState()
Returns the state of an individual 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
array An associative array of widget state data.
1 call to CalendarEventEmbeddedWidget::getItemState()
- CalendarEventEmbeddedWidget::alterForm in src/
CalendarEventEmbeddedWidget.php - Alters the parent form.
File
- src/
CalendarEventEmbeddedWidget.php, line 291
Class
- CalendarEventEmbeddedWidget
- Provides a widget to attach a calendar event to an entity.
Namespace
Drupal\opigno_calendar_eventCode
public function &getItemState(array $form, FormStateInterface $form_state, $delta) {
$widget_state =& $this
->getWidgetState($form, $form_state);
if (!isset($widget_state['items'][$delta])) {
$widget_state['items'][$delta] = [];
}
return $widget_state['items'][$delta];
}