You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a major change across all of ATK and would require new releases to be coordinated.
Prefixing
The benefit of using seed is automated prefixing. For instance:
$form->addField('due', ['Money']);
When looking for the class, it will actually prefix 'Money' with 'FieldDecorator'. If any slashes are specified then no prefixing will take place.
When this is passed to the factory routine, it will prepend class name with '\atk4\ui' as well.
For user-defined classes, it's easier just to pass the object, while 3rd party add-ons may add more ways to prepend things, e.g. \thirdparty\bootstrap\FieldDecorator\Money.
The text was updated successfully, but these errors were encountered:
The usage of "Seed" throughout the framework have been a bit inconsistent. This needs to be reviewed. Here is proposal on how seed should work:
this would be identical to:
Usage
This format would be respected throghout the framework, for example:
For this to work correctly, constructor of Button() should accept arguments like this:
Although it would require some refactoring, this approach would help with consistency. Another example is current implementation of TableColumn/Link:
would, without hacking, translate into
In other cases, if something is inconsistent, it needs to be adjusted. Here is example with addField:
Currently there is some custom logic there, but what we would have to do inside addfield:
In other words, the new implementation would allow this:
and actually could also give us alternative option to create reference:
This is a major change across all of ATK and would require new releases to be coordinated.
Prefixing
The benefit of using seed is automated prefixing. For instance:
When looking for the class, it will actually prefix 'Money' with 'FieldDecorator'. If any slashes are specified then no prefixing will take place.
When this is passed to the factory routine, it will prepend class name with '\atk4\ui' as well.
For user-defined classes, it's easier just to pass the object, while 3rd party add-ons may add more ways to prepend things, e.g. \thirdparty\bootstrap\FieldDecorator\Money.
The text was updated successfully, but these errors were encountered: