protected function CalendarEventEmbeddedWidget::isCalendarEventPopulated in Opigno calendar event 8
Same name in this branch
- 8 src/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\CalendarEventEmbeddedWidget::isCalendarEventPopulated()
- 8 src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::isCalendarEventPopulated()
Same name and namespace in other branches
- 3.x src/Form/CalendarEventEmbeddedWidget.php \Drupal\opigno_calendar_event\Form\CalendarEventEmbeddedWidget::isCalendarEventPopulated()
Checks whether the calendar event widget is populated.
Parameters
\Drupal\calendar_event\CalendarEventInterface $calendar_event: A calendar event entity built from the related submitted values.
Return value
bool TRUE if the widget was populated, FALSE otherwise.
2 calls to CalendarEventEmbeddedWidget::isCalendarEventPopulated()
- CalendarEventEmbeddedWidget::submitForm in src/
Form/ CalendarEventEmbeddedWidget.php - Submit handler.
- CalendarEventEmbeddedWidget::validateForm in src/
Form/ CalendarEventEmbeddedWidget.php - Validation handler.
File
- src/
Form/ CalendarEventEmbeddedWidget.php, line 427
Class
- CalendarEventEmbeddedWidget
- Provides a widget to attach a calendar event to an entity.
Namespace
Drupal\opigno_calendar_event\FormCode
protected function isCalendarEventPopulated(CalendarEventInterface $calendar_event) {
return $calendar_event
->isDisplayed() || !$calendar_event
->getDateItems()
->isEmpty();
}