美文网首页
2019-11-07-yii-Yii2 ActiveDataPr

2019-11-07-yii-Yii2 ActiveDataPr

作者: xiaojianxu | 来源:发表于2019-11-25 11:34 被阅读0次

    Yii2 ActiveDataProvider - Invalid argument supplied for foreach()

    Array
    (
        [0] => common\models\GoodsType Object
            (
                [children] => Array
                    (
                        [0] => common\models\GoodsType Object
                            (
                                [children] => 
                                [_attributes:yii\db\BaseActiveRecord:private] => Array
                                    (
                                        [id] => 3
                                        [name] => 新的笔记本
                                        [pid] => 1
                                        [sort] => 1
                                        [created_at] => 1574423302
                                        [updated_at] => 1574423302
                                    )
    
                                [_oldAttributes:yii\db\BaseActiveRecord:private] => Array
                                    (
                                        [id] => 3
                                        [name] => 新的笔记本
                                        [pid] => 1
                                        [sort] => 1
                                        [created_at] => 1574423302
                                        [updated_at] => 1574423302
                                    )
    
                                [_related:yii\db\BaseActiveRecord:private] => Array
                                    (
                                    )
    
                                [_relationsDependencies:yii\db\BaseActiveRecord:private] => Array
                                    (
                                    )
    
                                [_errors:yii\base\Model:private] => 
                                [_validators:yii\base\Model:private] => 
                                [_scenario:yii\base\Model:private] => default
                                [_events:yii\base\Component:private] => Array
                                    (
                                        [beforeInsert] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [0] => Array
                                                            (
                                                                [0] => yii\behaviors\TimestampBehavior Object
                                                                    (
                                                                        [createdAtAttribute] => created_at
                                                                        [updatedAtAttribute] => updated_at
                                                                        [value] => 
                                                                        [attributes] => Array
                                                                            (
                                                                                [beforeInsert] => Array
                                                                                    (
                                                                                        [0] => created_at
                                                                                        [1] => updated_at
                                                                                    )
    
                                                                                [beforeUpdate] => updated_at
                                                                            )
    
                                                                        [skipUpdateOnClean] => 1
                                                                        [preserveNonEmptyValues] => 
                                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                                    )
    
                                                                [1] => evaluateAttributes
                                                            )
    
                                                        [1] => 
                                                    )
    
                                            )
    
                                        [beforeUpdate] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [0] => Array
                                                            (
                                                                [0] => yii\behaviors\TimestampBehavior Object
                                                                    (
                                                                        [createdAtAttribute] => created_at
                                                                        [updatedAtAttribute] => updated_at
                                                                        [value] => 
                                                                        [attributes] => Array
                                                                            (
                                                                                [beforeInsert] => Array
                                                                                    (
                                                                                        [0] => created_at
                                                                                        [1] => updated_at
                                                                                    )
    
                                                                                [beforeUpdate] => updated_at
                                                                            )
    
                                                                        [skipUpdateOnClean] => 1
                                                                        [preserveNonEmptyValues] => 
                                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                                    )
    
                                                                [1] => evaluateAttributes
                                                            )
    
                                                        [1] => 
                                                    )
    
                                            )
    
                                    )
    
                                [_eventWildcards:yii\base\Component:private] => Array
                                    (
                                    )
    
                                [_behaviors:yii\base\Component:private] => Array
                                    (
                                        [0] => yii\behaviors\TimestampBehavior Object
                                            (
                                                [createdAtAttribute] => created_at
                                                [updatedAtAttribute] => updated_at
                                                [value] => 
                                                [attributes] => Array
                                                    (
                                                        [beforeInsert] => Array
                                                            (
                                                                [0] => created_at
                                                                [1] => updated_at
                                                            )
    
                                                        [beforeUpdate] => updated_at
                                                    )
    
                                                [skipUpdateOnClean] => 1
                                                [preserveNonEmptyValues] => 
                                                [owner] => common\models\GoodsType Object
     *RECURSION*
                                            )
    
                                    )
    
                            )
    
                    )
    
                [_attributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 1
                        [name] => 办公新来的
                        [pid] => 0
                        [sort] => 0
                        [created_at] => 1574423302
                        [updated_at] => 1574423302
                    )
    
                [_oldAttributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 1
                        [name] => 办公新来的
                        [pid] => 0
                        [sort] => 0
                        [created_at] => 1574423302
                        [updated_at] => 1574423302
                    )
    
                [_related:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_relationsDependencies:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_errors:yii\base\Model:private] => 
                [_validators:yii\base\Model:private] => 
                [_scenario:yii\base\Model:private] => default
                [_events:yii\base\Component:private] => Array
                    (
                        [beforeInsert] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                        [beforeUpdate] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                    )
    
                [_eventWildcards:yii\base\Component:private] => Array
                    (
                    )
    
                [_behaviors:yii\base\Component:private] => Array
                    (
                        [0] => yii\behaviors\TimestampBehavior Object
                            (
                                [createdAtAttribute] => created_at
                                [updatedAtAttribute] => updated_at
                                [value] => 
                                [attributes] => Array
                                    (
                                        [beforeInsert] => Array
                                            (
                                                [0] => created_at
                                                [1] => updated_at
                                            )
    
                                        [beforeUpdate] => updated_at
                                    )
    
                                [skipUpdateOnClean] => 1
                                [preserveNonEmptyValues] => 
                                [owner] => common\models\GoodsType Object
     *RECURSION*
                            )
    
                    )
    
            ),
        [2] => common\models\GoodsType Object
            (
                [children] => Array
                    (
                    )
    
                [_attributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 4
                        [name] => 新的screen-shot
                        [pid] => 0
                        [sort] => 0
                        [created_at] => 1574423302
                        [updated_at] => 1574423302
                    )
    
                [_oldAttributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 4
                        [name] => 新的screen-shot
                        [pid] => 0
                        [sort] => 0
                        [created_at] => 1574423302
                        [updated_at] => 1574423302
                    )
    
                [_related:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_relationsDependencies:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_errors:yii\base\Model:private] => 
                [_validators:yii\base\Model:private] => 
                [_scenario:yii\base\Model:private] => default
                [_events:yii\base\Component:private] => Array
                    (
                        [beforeInsert] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                        [beforeUpdate] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                    )
    
                [_eventWildcards:yii\base\Component:private] => Array
                    (
                    )
    
                [_behaviors:yii\base\Component:private] => Array
                    (
                        [0] => yii\behaviors\TimestampBehavior Object
                            (
                                [createdAtAttribute] => created_at
                                [updatedAtAttribute] => updated_at
                                [value] => 
                                [attributes] => Array
                                    (
                                        [beforeInsert] => Array
                                            (
                                                [0] => created_at
                                                [1] => updated_at
                                            )
    
                                        [beforeUpdate] => updated_at
                                    )
    
                                [skipUpdateOnClean] => 1
                                [preserveNonEmptyValues] => 
                                [owner] => common\models\GoodsType Object
     *RECURSION*
                            )
    
                    )
    
            )
    
        [3] => common\models\GoodsType Object
            (
                [children] => Array
                    (
                    )
    
                [_attributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 5
                        [name] => 办公用品
                        [pid] => 0
                        [sort] => 
                        [created_at] => 1574647082
                        [updated_at] => 1574647082
                    )
    
                [_oldAttributes:yii\db\BaseActiveRecord:private] => Array
                    (
                        [id] => 5
                        [name] => 办公用品
                        [pid] => 0
                        [sort] => 
                        [created_at] => 1574647082
                        [updated_at] => 1574647082
                    )
    
                [_related:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_relationsDependencies:yii\db\BaseActiveRecord:private] => Array
                    (
                    )
    
                [_errors:yii\base\Model:private] => 
                [_validators:yii\base\Model:private] => 
                [_scenario:yii\base\Model:private] => default
                [_events:yii\base\Component:private] => Array
                    (
                        [beforeInsert] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                        [beforeUpdate] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [0] => yii\behaviors\TimestampBehavior Object
                                                    (
                                                        [createdAtAttribute] => created_at
                                                        [updatedAtAttribute] => updated_at
                                                        [value] => 
                                                        [attributes] => Array
                                                            (
                                                                [beforeInsert] => Array
                                                                    (
                                                                        [0] => created_at
                                                                        [1] => updated_at
                                                                    )
    
                                                                [beforeUpdate] => updated_at
                                                            )
    
                                                        [skipUpdateOnClean] => 1
                                                        [preserveNonEmptyValues] => 
                                                        [owner] => common\models\GoodsType Object
     *RECURSION*
                                                    )
    
                                                [1] => evaluateAttributes
                                            )
    
                                        [1] => 
                                    )
    
                            )
    
                    )
    
                [_eventWildcards:yii\base\Component:private] => Array
                    (
                    )
    
                [_behaviors:yii\base\Component:private] => Array
                    (
                        [0] => yii\behaviors\TimestampBehavior Object
                            (
                                [createdAtAttribute] => created_at
                                [updatedAtAttribute] => updated_at
                                [value] => 
                                [attributes] => Array
                                    (
                                        [beforeInsert] => Array
                                            (
                                                [0] => created_at
                                                [1] => updated_at
                                            )
    
                                        [beforeUpdate] => updated_at
                                    )
    
                                [skipUpdateOnClean] => 1
                                [preserveNonEmptyValues] => 
                                [owner] => common\models\GoodsType Object
     *RECURSION*
                            )
    
                    )
    
            )
    )
    

    相关文章

      网友评论

          本文标题:2019-11-07-yii-Yii2 ActiveDataPr

          本文链接:https://www.haomeiwen.com/subject/cjumbctx.html