PHP Class Services\ModuleBuilder

Afficher le fichier Open project: doptor/doptor

Méthodes publiques

Свойство Type Description
$selected_forms
$templatePath

Protected Properties

Свойство Type Description
$form_rendered
$module_name
$nav_tabs
$temp_dir

Méthodes publiques

Méthode Description
SearchandReplace ( string $dir, string $stringsearch, string $stringreplace ) : array Recursively replace all occurences of string within a directory
Zip ( $source, $destination, boolean $include_dir = true ) : boolean Compresses a folder
__construct ( )
createModule ( $input )
generateForm ( $form ) : string Generate the complete form
getCaptchaField ( integer $form ) Get captcha to add to form if captcha option is selected
getFormFields ( $form_data ) : array Get the available form fields from the generated form
getFormSelects ( $form_id ) : array Get all the select/dropdown fields in a form
setFormDropdownSources ( $input ) : string

Private Methods

Méthode Description
adjustFiles ( $input ) Adjust the template files according to the provided input
copyTemplate ( ) Copy the module template to a temporary directory
generateHashForNullHashModules ( )
generateInnerForm ( ) Generate the inner portion form based on the input
generateModelName ( $table_name ) : mixed Generate model name from the table name specified
generateModuleAlias ( $module_name ) : mixed Generate the alias of the module
generateModules ( ) Generate modules for each form tables
generateRoutes ( array $targets ) : string
generateTableName ( $module_name, $form_name ) : string Generate table name, for the selected module and form
generateZip ( $module_alias ) : string Generate a zip file of the module
getFormInfo ( $index ) Get the information about the form
getRequiredModulesInfo ( $input )
getSelectedForms ( $input ) Get all the forms that were selected
saveModuleConfig ( $input, $module_alias, $requires ) Save the module configuration to a json file

Method Details

SearchandReplace() public méthode

Recursively replace all occurences of string within a directory
public SearchandReplace ( string $dir, string $stringsearch, string $stringreplace ) : array
$dir string Source Directory
$stringsearch string String to search
$stringreplace string String to replace
Résultat array

Zip() public méthode

Compresses a folder
public Zip ( $source, $destination, boolean $include_dir = true ) : boolean
$source
$destination
$include_dir boolean
Résultat boolean

__construct() public méthode

public __construct ( )

createModule() public méthode

public createModule ( $input )

generateForm() public méthode

Generate the complete form
public generateForm ( $form ) : string
$form
Résultat string

getCaptchaField() public méthode

Get captcha to add to form if captcha option is selected
public getCaptchaField ( integer $form )
$form integer

getFormFields() public méthode

Get the available form fields from the generated form
public getFormFields ( $form_data ) : array
$form_data
Résultat array

getFormSelects() public méthode

Get all the select/dropdown fields in a form
public getFormSelects ( $form_id ) : array
$form_id
Résultat array

setFormDropdownSources() public méthode

public setFormDropdownSources ( $input ) : string
$input
Résultat string

Property Details

$form_rendered protected_oe property

protected $form_rendered

$module_name protected_oe property

protected $module_name

$nav_tabs protected_oe property

protected $nav_tabs

$selected_forms public_oe property

public $selected_forms

$temp_dir protected_oe property

protected $temp_dir

$templatePath public_oe property

public $templatePath