protected function CalendarEventEmbeddedWidget::getElementParents in Opigno calendar event 8
Same name in this branch
- 8 src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::getElementParents()
- 8 src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::getElementParents()
Same name and namespace in other branches
- 3.x src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::getElementParents()
Returns the parent element names for the specified subform.
Parameters
array $form: The parent form array.
int|null $delta: (optional) A subform item delta. Defaults to none.
Return value
string[] An array of element names.
2 calls to CalendarEventEmbeddedWidget::getElementParents()
- CalendarEventEmbeddedWidget::alterForm in src/
CalendarEventEmbeddedWidget.php - Alters the parent form.
- CalendarEventEmbeddedWidget::getItemValues in src/
CalendarEventEmbeddedWidget.php - Returns the submitted values for the specified subform item.
File
- src/
CalendarEventEmbeddedWidget.php, line 407
Class
- CalendarEventEmbeddedWidget
- Provides a widget to attach a calendar event to an entity.
Namespace
Drupal\opigno_calendar_eventCode
protected function getElementParents(array $form, $delta = NULL) {
$parents = $form['#parents'];
$parents[] = static::ELEMENT_NAME;
if (isset($delta)) {
$parents[] = $delta;
}
return $parents;
}