public function CalendarEventManager::isSettingsForm in Opigno calendar event 8
Same name and namespace in other branches
- 3.x src/CalendarEventManager.php \Drupal\opigno_calendar_event\CalendarEventManager::isSettingsForm()
Checks whether a form should host the widget settings.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
bool TRUE if the form should host the widget settings, FALSE otherwise.
File
- src/
CalendarEventManager.php, line 94
Class
- CalendarEventManager
- The calendar event manager.
Namespace
Drupal\opigno_calendar_eventCode
public function isSettingsForm(FormStateInterface $form_state) {
/** @var \Drupal\field_ui\Form\FieldConfigEditForm $form_object */
$form_object = $form_state
->getFormObject();
/** @var \Drupal\field\FieldConfigInterface $field */
$field = $form_object
->getEntity();
return $field
->getTargetEntityTypeId() === 'opigno_calendar_event' && $field
->getType() === 'entity_reference';
}