private function addWidget($diyId, $itemId, $containerId, $positionId, $draggable_id){
        // Generate template widget
        $template = DiyWidget::generateTemplateSetting($containerId, $positionId, $itemId, $draggable_id, []);
        
        $model = Diy::find()->where(['_id' => $diyId])->one();
        if ($model) {
            // Check position co widget hay chua
            $position = ArrayHelper::getValue($model->data[$containerId][$positionId], 'widgets', []);
            // Neu chua thi add moi vao position
            if (empty($position)){
                $model->data = ArrayHelper::merge($model->data, [
                    $containerId => [
                        $positionId => ArrayHelper::merge($model->data[$containerId][$positionId], [
                            'widgets' => [
                                $itemId => [
                                    'id' => $draggable_id
                                ]
                            ]
                        ])
                    ]
                ]);
            } else { // Neu co widget trong position thi add them vao mang hien co
                $model->data = ArrayHelper::merge($model->data, [
                    $containerId => [
                        $positionId => ArrayHelper::merge($model->data[$containerId][$positionId], [
                            'widgets' => ArrayHelper::merge($model->data[$containerId][$positionId]['widgets'], [
                                $itemId => [
                                    'id' => $draggable_id
                                ]
                            ])
                        ])
                    ]
                ]);
            }
            
            $model->save();
        }
        
        return $template;
    }