Tailor\Classes\ContentDecoder\ImportDecoder
Overview
ImportDecoder applies import data using the permissive trust rules of backend imports, where the operator is trusted with the data.
Extends
Protected Properties
protected $import
Public Methods
public __construct()
public __construct($import): void
__construct with the import model hosting events and file resolution.
Inherited Public Methods
- decode() - applies each attribute in the data array to the model. (defined in Tailor\Classes\ContentDecoder\Decoder)
- decodeModelAttribute() - applies a single attribute value to the model. (defined in Tailor\Classes\ContentDecoder\Decoder)
Protected Methods
protected beforeDecodeAttribute()
protected beforeDecodeAttribute($model, $attr, &$value): bool
beforeDecodeAttribute fires the import transformation event on the host model.
protected decodeFileRelation()
protected decodeFileRelation($model, $attr, $value, $sessionKey): void
decodeFileRelation resolves file path references through the import model.
Show inherited protected methods
Inherited Protected Methods
- coerceAssociationId() - gates the value before it is passed to a relation association. (defined in Tailor\Classes\ContentDecoder\Decoder)
- coerceChildAttributes() - gates the attributes of a single child record before it is built. (defined in Tailor\Classes\ContentDecoder\Decoder)
- coerceRelationValue() - gates the raw value before child records are built from it. (defined in Tailor\Classes\ContentDecoder\Decoder)
- decodeRepeaterItem() - applies nested data to a child record. (defined in Tailor\Classes\ContentDecoder\Decoder)
- decodeRepeaterItems() - builds child records from nested data. (defined in Tailor\Classes\ContentDecoder\Decoder)