PHP Class Appzcoder\CrudGenerator\Commands\CrudViewCommand

Inheritance: extends Illuminate\Console\Command
Show file Open project: appzcoder/crud-generator

Protected Properties

Property Type Description
$crudName string Name of the Crud.
$crudNameCap string Crud Name in capital form.
$crudNameSingular string Crud Name in singular form.
$defaultColumnsToShow integer Number of columns to show from the table. Others are hidden.
$description string The console command description.
$formBodyHtml string Html of the form body.
$formBodyHtmlForShowView string Html of view to show.
$formFields array Form's fields.
$formFieldsHtml string Html of Form's fields.
$formHeadingHtml string Html of the form heading.
$modelName string Name of the Model.
$primaryKey string Primary key of the model.
$routeGroup string Name or prefix of the Route Group.
$signature string The name and signature of the console command.
$typeLookup array Form field types collection.
$viewDirectoryPath string View Directory Path.
$viewName string Name of the View Dir.

Public Methods

Method Description
__construct ( ) : void Create a new command instance.
handle ( ) : void Execute the console command.
templateCreateVars ( string $newCreateFile ) : void Update values between %% with real values in create view.
templateEditVars ( string $newEditFile ) : void Update values between %% with real values in edit view.
templateFormVars ( string $newFormFile ) : void Update values between %% with real values in form view.
templateIndexVars ( string $newIndexFile ) : void Update values between %% with real values in index view.
templateShowVars ( string $newShowFile ) : void Update values between %% with real values in show view.

Protected Methods

Method Description
createField ( array $item ) : string Form field generator.
createFormField ( array $item ) : string Create a specific field using the form helper.
createInputField ( array $item ) : string Create a generic input field using the form helper.
createPasswordField ( array $item ) : string Create a password field using the form helper.
createRadioField ( array $item ) : string Create a yes/no radio button group using the form helper.
createSelectField ( array $item ) : string Create a select field using the form helper.
wrapField ( string $item, string $field ) : void Form field wrapper.

Method Details

__construct() public method

Create a new command instance.
public __construct ( ) : void
return void

createField() protected method

Form field generator.
protected createField ( array $item ) : string
$item array
return string

createFormField() protected method

Create a specific field using the form helper.
protected createFormField ( array $item ) : string
$item array
return string

createInputField() protected method

Create a generic input field using the form helper.
protected createInputField ( array $item ) : string
$item array
return string

createPasswordField() protected method

Create a password field using the form helper.
protected createPasswordField ( array $item ) : string
$item array
return string

createRadioField() protected method

Create a yes/no radio button group using the form helper.
protected createRadioField ( array $item ) : string
$item array
return string

createSelectField() protected method

Create a select field using the form helper.
protected createSelectField ( array $item ) : string
$item array
return string

handle() public method

Execute the console command.
public handle ( ) : void
return void

templateCreateVars() public method

Update values between %% with real values in create view.
public templateCreateVars ( string $newCreateFile ) : void
$newCreateFile string
return void

templateEditVars() public method

Update values between %% with real values in edit view.
public templateEditVars ( string $newEditFile ) : void
$newEditFile string
return void

templateFormVars() public method

Update values between %% with real values in form view.
public templateFormVars ( string $newFormFile ) : void
$newFormFile string
return void

templateIndexVars() public method

Update values between %% with real values in index view.
public templateIndexVars ( string $newIndexFile ) : void
$newIndexFile string
return void

templateShowVars() public method

Update values between %% with real values in show view.
public templateShowVars ( string $newShowFile ) : void
$newShowFile string
return void

wrapField() protected method

Form field wrapper.
protected wrapField ( string $item, string $field ) : void
$item string
$field string
return void

Property Details

$crudName protected property

Name of the Crud.
protected string $crudName
return string

$crudNameCap protected property

Crud Name in capital form.
protected string $crudNameCap
return string

$crudNameSingular protected property

Crud Name in singular form.
protected string $crudNameSingular
return string

$defaultColumnsToShow protected property

Number of columns to show from the table. Others are hidden.
protected int $defaultColumnsToShow
return integer

$description protected property

The console command description.
protected string $description
return string

$formBodyHtml protected property

Html of the form body.
protected string $formBodyHtml
return string

$formBodyHtmlForShowView protected property

Html of view to show.
protected string $formBodyHtmlForShowView
return string

$formFields protected property

Form's fields.
protected array $formFields
return array

$formFieldsHtml protected property

Html of Form's fields.
protected string $formFieldsHtml
return string

$formHeadingHtml protected property

Html of the form heading.
protected string $formHeadingHtml
return string

$modelName protected property

Name of the Model.
protected string $modelName
return string

$primaryKey protected property

Primary key of the model.
protected string $primaryKey
return string

$routeGroup protected property

Name or prefix of the Route Group.
protected string $routeGroup
return string

$signature protected property

The name and signature of the console command.
protected string $signature
return string

$typeLookup protected property

Form field types collection.
protected array $typeLookup
return array

$viewDirectoryPath protected property

View Directory Path.
protected string $viewDirectoryPath
return string

$viewName protected property

Name of the View Dir.
protected string $viewName
return string