public BaseFieldDefinition::setDisplayOptions($display_context, array $options)
Sets the display options for the field in forms or rendered entities.
This enables generic rendering of the field with widgets / formatters, including automated support for "In place editing", and with optional configurability in the "Manage display" / "Manage form display" UI screens.
Unless this method is called, the field remains invisible (or requires ad-hoc rendering logic).
Parameters
string $display_context: