Mezon provides set of classes for GUI creation.
Just print in console
composer require mezon/gui
And that's all )
This class provides utilities for date and time tasks. For example this call:
Mezon\Class\DateTimeUtils::isToday('2020-02-02');
Will return true if the passed date is a today and false otherwise.
And this method will return true if the passed date was a yesterday:
Mezon\Class\DateTimeUtils::isYesterday('2020-02-02');
But we also can get name of the month by it's code:
Mezon\Class\DateTimeUtils::locale = 'ru';
var_dump(Mezon\Class\DateTimeUtils::dayMonth('2020-02-02'));
This class provides routines for operation with form fields. To init this class use constructor:
$fields = new \Mezon\Gui\FieldsAlgorithms([
'id'=>['type'=>'int'],
'description'=>['type'=>'string']
]);
Here we define two fields.
Form builder is obviously used for building forms )
It can be done like this:
$form = new \Mezon\Gui\FormBuilder([
'id' => [
'type' => 'int',
'title' => 'our entity's id'
],
'title' => [
'type' => 'string',
'title' => 'our entity's title'
]
]);