PHP 클래스 Services\ModuleBuilder

파일 보기 프로젝트 열기: doptor/doptor

공개 프로퍼티들

프로퍼티 타입 설명
$selected_forms
$templatePath

보호된 프로퍼티들

프로퍼티 타입 설명
$form_rendered
$module_name
$nav_tabs
$temp_dir

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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

메소드 상세

SearchandReplace() 공개 메소드

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
리턴 array

Zip() 공개 메소드

Compresses a folder
public Zip ( $source, $destination, boolean $include_dir = true ) : boolean
$source
$destination
$include_dir boolean
리턴 boolean

__construct() 공개 메소드

public __construct ( )

createModule() 공개 메소드

public createModule ( $input )

generateForm() 공개 메소드

Generate the complete form
public generateForm ( $form ) : string
$form
리턴 string

getCaptchaField() 공개 메소드

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

getFormFields() 공개 메소드

Get the available form fields from the generated form
public getFormFields ( $form_data ) : array
$form_data
리턴 array

getFormSelects() 공개 메소드

Get all the select/dropdown fields in a form
public getFormSelects ( $form_id ) : array
$form_id
리턴 array

setFormDropdownSources() 공개 메소드

public setFormDropdownSources ( $input ) : string
$input
리턴 string

프로퍼티 상세

$form_rendered 보호되어 있는 프로퍼티

protected $form_rendered

$module_name 보호되어 있는 프로퍼티

protected $module_name

$nav_tabs 보호되어 있는 프로퍼티

protected $nav_tabs

$selected_forms 공개적으로 프로퍼티

public $selected_forms

$temp_dir 보호되어 있는 프로퍼티

protected $temp_dir

$templatePath 공개적으로 프로퍼티

public $templatePath