Download the PHP package e-frank/yii2-data without Composer
On this page you can find all versions of the php package e-frank/yii2-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download e-frank/yii2-data
More information about e-frank/yii2-data
Files in e-frank/yii2-data
Download e-frank/yii2-data
More information about e-frank/yii2-data
Files in e-frank/yii2-data
Vendor e-frank
Package yii2-data
Short Description Helpers for persisting relational data from arrays
License BSD-3-Clause
Package yii2-data
Short Description Helpers for persisting relational data from arrays
License BSD-3-Clause
Please rate this library. Is it a good library?
Informations about the package yii2-data
yii2-data
Hierarchical hydrator for ActiveRecord with support for relations and sorting.
Usage
- (default) unlinks all orderItems except the ones passed in .
- additionally to unlink, also deletes these models. it has no effect on
- if relation configuration values are not explicitly set, the default values at root level are used
pass all needed relations to the configurations array. you can customize the processing of related data as shown below, like link/unlink and delete/skip behavior.
option | value | description |
---|---|---|
updates and creates, but does not remove omitted models | ||
sets the relation's models only to the ones passed by load(), all others are removed | ||
models missing in the relation are unlinked and deleted | ||
models missing in the relation are unlinked |
Data Example
Behind the scene
- The helper class just attaches the to an ActiveRecord
- For each relation, the is attached. This allows capturing the relation's setter (when loading)
- Now also cares about relations.
- On before save, a transaction is opened
- If everything is valid (ignoring those models, who skipError), we can finally save
- or the transaction
- use and
All versions of yii2-data with dependencies
PHP Build Version
Package Version
The package e-frank/yii2-data contains the following files
Loading the files please wait ....