Skip to main content
added 139 characters in body
Source Link
sonfd
  • 8.1k
  • 1
  • 20
  • 40

First, it's probably preferable to use the provider option if you can.

However, Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You couldcan use this method to limit the widget to just a datetime field with a particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if other modules are enabled.

Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You could use this to limit the widget to just a datetime field with a particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if other modules are enabled.

First, it's probably preferable to use the provider option if you can.

However, Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You can use this method to limit the widget to just a datetime field with a particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if other modules are enabled.

added 4 characters in body
Source Link
sonfd
  • 8.1k
  • 1
  • 20
  • 40

Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You could use this to limit the widget to just a datetime field with a particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if another module isother modules are enabled.

Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You could use this to limit the widget to just a datetime field with particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if another module is enabled.

Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You could use this to limit the widget to just a datetime field with a particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if other modules are enabled.

Source Link
sonfd
  • 8.1k
  • 1
  • 20
  • 40

Field widgets and formatters also make use of an isApplicable() method. You can use this for any additional logic logic to determine whether your widget should be available for a field, a field in the subset of fields defined in your annotation.

You could use this to limit the widget to just a datetime field with particular machine name, or only datetime fields on nodes, etc.

You can also use it for your case, to check if another module is enabled.