Revision #213 was created by rackycz on Jul 13, 2020, 1:54:31 PM.
Grid layout + helpers
Content
[...]
// filterSelector is the core solution of this problem. It refreshes the grid.
```
**Creating your new helper class**
--- Sometimes you need a static class that will do things for you. This is what helpers do.
I work with the Basic example so I do things like this:
- Create folder named "myHelpers" next to the folder "controllers"
- Place there your class and do not forget about the "namespace":
[...]
```
- If you want to use the class, do not forget to include the file:
```php
use myHelpers\MyClassName;
```
- And now you can use the any method. For example this static method:
```php// ...
echo MyClassName::myMethod(123);
```
[...]
The result is that your form has 3 rows, the middle one is empty. In the first row there are 3 cells (username, nothing, email) and in the last row there is 2x password.
You do not have to write any HTML, you only arrange inputs into any number of rows and columns (using the array $gridForm) and things just happen automagically.