From 583a61c8c4d8d4043a9a0693ccdc456c3cb61402 Mon Sep 17 00:00:00 2001 From: Uldis Nelsons Date: Mon, 2 Jan 2023 13:03:31 +0200 Subject: [PATCH] Update README.md --- README.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 90466cb..4012596 100644 --- a/README.md +++ b/README.md @@ -152,9 +152,10 @@ For implementing access control add separate actions for upload, download and de 'allow' => true, 'actions' => [ 'd3filesdownload', - 'd3filesopen', //d3filesopen + 'd3filesopen', 'd3filesupload', 'd3filesdelete', + 'd3fileseditnotes' ], 'roles' => ['role1','role2'], ], @@ -168,34 +169,42 @@ For implementing access control add separate actions for upload, download and de ], ], ]; - return array_merge(parent::behaviors(), $addBehaviors); } public function actions() { return [ 'd3filesdownload' => [ - 'class' => 'd3yii2\d3files\components\DownloadAction', - 'modelName' => RkInvoice::className(), + 'class' => d3yii2\d3files\components\DownloadAction::class, + 'modelName' => D3pPerson::class, ], 'd3filesupload' => [ - 'class' => 'd3yii2\d3files\components\UploadAction', - 'modelName' => RkInvoice::className(), + 'class' => d3yii2\d3files\components\UploadAction::class, + 'modelName' => D3pPerson::class, ], 'd3filesdelete' => [ - 'class' => 'd3yii2\d3files\components\DeleteAction', - 'modelName' => RkInvoice::className(), + 'class' => \d3yii2\d3files\components\DeleteAction::class, + 'modelName' => D3pPerson::class, ], // for D3FilesPreviewWidget + 'd3filesopen' => [ + 'class' => Dd3yii2\d3files\components\ownloadAction::class, + 'modelName' => D3pPerson::class, + 'downloadType' => 'open' + ], + // for D3FilesPreviewWidget 'd3filesopen' => [ 'class' => 'd3yii2\d3files\components\DownloadAction', 'modelName' => RkInvoice::class, 'downloadType' => 'open' - ], - + ], + // for D3FilesPreviewWidget + 'd3fileseditnotes' => [ + 'class' => EditNotesAction::class, + 'modelName' => D3pPerson::class, + ], ]; } - ``` Widget