Input

Input

new Input()

Properties:
Name Type Description
validation array The input store validation
name string The input name
type string The input type
label string The input label
placeholder string The input placeholder
cols number The input columns on the template
defaultValue string The input default value
colsMedium number The medium input columns on the template
colsLarge number The large input columns on the template
order integer The input order
readOnly boolean Determines if input is read only
required boolean Determines if input is required
isComputed boolean Determines if input is computed
showComputedOnLivewireForm boolean Determines whether to show the computed formula in the livewire form
checked boolean Determines if input is checked
onCreate boolean The input onCreate hook
onUpdate boolean The input onUpdate hook
onShow boolean The input onShow hook
onIndex boolean The input onIndex hook
updateValidation array | null The input update validation
computedFormula string | null The input computed formula
livewireInputReference string | null The input livewire reference
max string | null The input max value
min string | null The input min value
step string | null The input step value
items string | null The input items
crud Crud The input related crud
field Field The input related field
relationship BasicRelationship The input basic relationship

Methods

allowsDefaultValue() → {boolean}

Check if this input type allows the default value
Returns:
Type
boolean

allowsItems() → {boolean}

Check if this input type allows items
Returns:
Type
boolean

allowsMax() → {boolean}

Check if this input type allows the maximum value
Returns:
Type
boolean

allowsMin() → {boolean}

Check if this input type allows the minimum value
Returns:
Type
boolean

allowsPlaceholder() → {boolean}

Check if this input type allows the placeholder value
Returns:
Type
boolean

canUseLivewireReference() → {boolean}

Check if this input can use a livewire reference
Returns:
Type
boolean

convertValidationToArrayForTemplate() → {string}

Returns the input validation as array
Returns:
Type
string

convertValidationToTextForTemplate() → {string}

Returns the input validation as string
Returns:
Type
string

getFirstItem() → {string|null}

Returns the first item of this input (if it is a select input)
Returns:
Type
string | null

getLivewirePropertyReference() → {string}

Returns the livewire PHP reference, used for access the model in livewire PHP component
Returns:
Type
string

getLivewireSingleName() → {string}

Returns the livewire single name, used for validations
Returns:
Type
string

getRelationshipCollectionName() → {string}

Returns this relationship collection name
Returns:
Type
string

getRequiredAttributeForTemplate() → {string}

Returns the required attribute for HTML input template
Returns:
Type
string

getType() → {string}

Returns the input type
Returns:
Type
string

getUpdateValidationWithUniqueRules(instanceAsProperty) → {string}

Returns the PHP update validations
Parameters:
Name Type Default Description
instanceAsProperty boolean false Will determine the way in which the validation model will be called (such as property with dependency injection, or common variable)
Returns:
Type
string

getValidationForTemplate() → {string}

Returns the validation for HTML input template
Returns:
Type
string

hasDifferentUpdateValidation() → {boolean}

Check if has different store and update validations
Returns:
Type
boolean

hasStep() → {boolean}

Check if this input type has a step attribute
Returns:
Type
boolean

hasUpdateValidation() → {boolean}

Check if it has update validations
Returns:
Type
boolean

hasValidation() → {boolean}

Check if it has store validations
Returns:
Type
boolean

isAllowedOnIndexPages() → {boolean}

Returns if this input is allowed on index pages
Returns:
Type
boolean

isDate() → {boolean}

Check if it is a date input
Returns:
Type
boolean

isFile() → {boolean}

Check if it is a file input
Returns:
Type
boolean

isForEnum() → {boolean}

Check if it is a ENUM input
Returns:
Type
boolean

isForRelationship() → {boolean}

Check if it is a relationship input
Returns:
Type
boolean

isImage() → {boolean}

Check if it is a image input
Returns:
Type
boolean

isJson() → {boolean}

Check if it is a JSON input
Returns:
Type
boolean

isLinkedToField() → {boolean}

Check if it is linked to a field
Returns:
Type
boolean

isNumeric() → {boolean}

Check if it is a numeric input
Returns:
Type
boolean

isPassword() → {boolean}

Check if it is a password input
Returns:
Type
boolean

isRelatedToModel(model) → {boolean}

Check if it is related to model
Parameters:
Name Type Description
model Entity
Returns:
Type
boolean

isRequiredOnCreate() → {boolean}

Check if it is required on create form
Returns:
Type
boolean

isRequiredOnUpdate() → {boolean}

Check if it is required on update form
Returns:
Type
boolean

isSelect() → {boolean}

Check if it is a select input
Returns:
Type
boolean

isUrl() → {boolean}

Check if it is a URL input
Returns:
Type
boolean

needsMaxValidation() → {boolean}

Check if this type needs a maximum value validation
Returns:
Type
boolean

needsMinValidation() → {boolean}

Check if this type needs a minimum value validation
Returns:
Type
boolean