ThemeImport

Theme import model

 class Cms\Models\ThemeImport
extends Model

Extends

Class Description
Model

Traits

Trait Description
Validation

Properties

public $attachOne : mixed

public $attributes : array

Make the model's attributes public so behaviors can modify them.

public $rules : array

The rules to be applied to the data.

public $table : string

The database table used by the model.

protected $fillable : array

Fillable fields

protected $guarded : array

Guarded fields

inherited protected $validationDefaultAttrNames : array

Inherited from Validation

Default custom attribute names.

inherited protected $validationErrors : Illuminate\Support\MessageBag

Inherited from Validation

The message bag instance containing validation error messages

Methods

public getFoldersOptions ()

Returns
mixed

public import ($theme, array $data = [], $sessionKey = null)

Parameters
Property Description
$theme
mixed
$data
array
$sessionKey
mixed
Returns
mixed

public save ($options = null, $sessionKey = null) : void

Import / Export model classes are helpers and are not to write to the database

Parameters
Property Description
$options
mixed
$sessionKey
mixed
Returns
void

public setThemeAttribute ($theme)

Parameters
Property Description
$theme
mixed
Returns
mixed

protected copyDirectory (string $directory, string $destination) : bool

Helper for copying directories that supports the ability to not overwrite existing files. Inherited from File::copyDirectory

Parameters
Property Description
$directory
string
$destination
string
Returns
bool

inherited public static bootValidation () : void

Inherited from Validation

Boot the validation trait for this model.

Returns
void

inherited public errors () : Illuminate\Support\MessageBag

Inherited from Validation

Get validation error message collection for the Model

Returns
Illuminate\Support\MessageBag

inherited public forceSave ($options = null, $sessionKey = null) : bool

Inherited from Validation

Force save the model even if validation fails.

Parameters
Property Description
$options
mixed
$sessionKey
mixed
Returns
bool

inherited public isAttributeRequired (string $attribute, boolean $checkDependencies = true) : bool

Inherited from Validation

Determines if an attribute is required based on the validation rules.

Parameters
Property Description
$attribute
string
$checkDependencies
boolean

Checks the attribute dependencies (for required_if & required_with rules). Note that it will only be checked up to the next level, if another dependent rule is found then it will just assume the field is required

Returns
bool

inherited public setValidationAttributeName (string $attr, string $name) : void

Inherited from Validation

Programatically sets the validation attribute names, will take lower priority to model defined attribute names found in $attributeNames.

Parameters
Property Description
$attr
string
$name
string
Returns
void

inherited public setValidationAttributeNames (array $attributeNames) : void

Inherited from Validation

Programatically sets multiple validation attribute names.

Parameters
Property Description
$attributeNames
array
Returns
void

inherited public validate ($rules = null, $customMessages = null, $attributeNames = null) : bool

Inherited from Validation

Validate the model instance

Parameters
Property Description
$rules
mixed
$customMessages
mixed
$attributeNames
mixed
Returns
bool

inherited public static validated (Closure | string $callback) : void

Inherited from Validation

Create a new native event for handling afterValidate().

Parameters
Property Description
$callback
Closure | string
Returns
void

inherited public static validating (Closure | string $callback) : void

Inherited from Validation

Create a new native event for handling beforeValidate().

Parameters
Property Description
$callback
Closure | string
Returns
void

inherited protected getRelationValidationValue ($relationName)

Inherited from Validation

Attachments validate differently to their simple values.

Parameters
Property Description
$relationName
mixed
Returns
mixed

inherited protected getValidationAttributes () : array

Inherited from Validation

Returns the model data used for validation.

Returns
array

inherited protected static makeValidator ($data, $rules, $customMessages, $attributeNames, $connection = null) : Illuminate\Contracts\Validation\Validator

Inherited from Validation

Instantiates the validator used by the validation process, depending if the class is being used inside or outside of Laravel. Optional connection string to make the validator use a different database connection than the default connection.

Parameters
Property Description
$data
mixed
$rules
mixed
$customMessages
mixed
$attributeNames
mixed
$connection
mixed
Returns
Illuminate\Contracts\Validation\Validator

inherited protected processRuleFieldNames (array $rules) : array

Inherited from Validation

Processes field names in a rule array.

Converts any field names using array notation (ie. field[child]) into dot notation (ie. field.child)

Parameters
Property Description
$rules
array

Rules array

Returns
array

inherited protected processValidationRules ($rules)

Inherited from Validation

Process rules

Parameters
Property Description
$rules
mixed
Returns
mixed

inherited protected processValidationUniqueRule (string $definition, string $fieldName) : string

Inherited from Validation

Rebuilds the unique validation rule to force for the existing ID

Parameters
Property Description
$definition
string
$fieldName
string
Returns
string
Copyright © 2024 Winter CMS