Skip to content

sagarmanchanda/Work-Flow-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

173 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Automation

Software License Build Status Coverage Status Quality Score

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

Install

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

Usage

The directory structure within src folder and the WFA namespace structure is linked.

Using Form Builder

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

Generate Documentation (For Developers)

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/

Dependencies

All dependencies are listed in the DEPENDENCIES file.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

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

Contributing

Please see CONTRIBUTING for details.

Issues

All issues are tracked through the GitLab issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •