Skip to content

alexdodonov/mezon-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GUI

Build Status codecov Scrutinizer Code Quality

Intro

Mezon provides set of classes for GUI creation.

Installation

Just print in console

composer require mezon/gui

And that's all )

Usage

DateTimeUtils class

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'));

Fields algorithms

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

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'
	]
]);

About

Set of GUI utilities and classes

Resources

Stars

Watchers

Forks

Packages

No packages published