API for workflow automation. Currently restricted to IIT Guwahati campus, however can be extended to any work-place by hacking into the authentication and formbuilder tools.
Every updated detail is available in the Wiki
To install, download the WFA package from GitLab and run install.sh
:
$ . install.sh
Note: if it does not work, try the following and re-run:
$ sudo chmod a+x install.sh
The directory structure within src folder and the WFA namespace structure is linked.
To start building a form:
require 'vendor/autoload.php';
$form = new WFA\FormBuilder\Form();
Currently supported input types include textboxes, radio buttons, password fields and submit buttons. To add new elements to form:
$form->addElement('type of input', 'name of field', 'HTML label for the field');
To add validation rules like email or required to these fields:
$form->addElement('type of input', 'name of field', 'HTML label for the field');
$form->addRule('name of field', 'required');
$form->addRule('name of field', 'email');
After you're done adding form elements, close the form by the following:
$form->buildForm();
Now you may proceed to add a new form, for example:
$form2 = new WFA\FormBuilder\Form();
Add phpdoc
path to your environment variables:
$ cd vendor/phpdocumentor/phpdocumentor/bin
$ export PATH=$PWD:$PATH
Then go back to the root of the software and execute the following:
$ phpdoc -d src/ -t docs/
All dependencies are listed in the DEPENDENCIES file.
Please see CHANGELOG for more information what has changed recently.
Testing is done through PHPUnit. All test suites are stored in the 'tests' folder. All tests for a class 'Class' are named as 'ClassTest'. To run tests for a class say 'ExampleClass', use the following:
$ phpunit --bootstrap vendor/autoload.php tests/ExampleClassTest
Please see CONTRIBUTING for details.
All issues are tracked through the GitLab issue tracker.
The MIT License (MIT). Please see License File for more information.