3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
Commit graph

9 commits

Author SHA1 Message Date
Michael Stenta
de8a262685 Remove requiresEntity() method. 2023-10-06 14:11:11 -04:00
Michael Stenta
554afce229 Add a requiresEntity boolean to quick form plugins to optionally prevent creating default instances. 2023-10-06 14:11:10 -04:00
Michael Stenta
898d2355f0 Introduce new getQuickId() and setQuickId() methods. Deprecate getId(). 2023-10-06 14:11:10 -04:00
Michael Stenta
14365f6008 Provide a ConfigurableQuickFormInterface that quick forms can use to declare themselves configurable.
This extends from QuickFormInterface, as well as ConfigurableInterface
(which adds getConfiguration(), setConfiguration(), and defaultConfiguration())
and PluginFormInterface (which adds buildConfigurationForm(),
validateConfigurationForm(), and submitConfigurationForm()).
2023-10-06 14:11:10 -04:00
Michael Stenta
cec5cc352a Fix camelCase of quick form plugin getLabel() method. 2023-10-06 13:58:57 -04:00
Michael Stenta
05c7da18b4 Extend QuickFormInterface from FormInterface.
We already implement buildForm(), validateForm(), and submitForm().
The only method this adds is getFormId(). So we will also refactor
how getFormId() works in \Drupal\farm_quick\Form\QuickForm to get
it from plugin instances instead of generating it itself.
2023-10-06 13:58:57 -04:00
Michael Stenta
5fefeb3820 QuickFormInterface does not need to extend from PluginIntrospectionInterface.
Quick forms already extend from \Drupal\Component\Plugin\PluginBase,
which implements PluginIntrospectionInterface. There is no need for
QuickFormInterface to extend from it.
2023-10-06 13:58:57 -04:00
Paul Weidner
5ca5f1a3ab Fix phpcs error that use statements should be sorted alphabetically 2023-06-13 09:53:49 -07:00
Michael Stenta
a36bf06b4a Move QuickFormBase and QuickFormInterface to src/Plugin/QuickForm. 2021-10-27 15:22:34 -04:00