PHP code example of dkemens / yii2-aws-s3-manager

1. Go to this page and download the library: Download dkemens/yii2-aws-s3-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dkemens / yii2-aws-s3-manager example snippets


return [
    //....
    'modules' => [
        's3manager' => [
            'class' => 'skylineos\yii\s3manager\Module',
            // All settings can be configured on the fly regardless of usage type (fileinput, standalone manager, tinymce plugin)
            'configuration' => [ 
                'bucket' => 'your-bucket-name', // can be overriden with \Yii::$app->params['s3bucket']
                'version' => 'latest',
                'region' => 'your-bucket-region', // can be overriden with \Yii::$app->params['s3region']
                'scheme' => 'http',
            ],            
        ],
    ]
];

<label>My Field</label>
<?= FileInput::widget(['model' => $model, 'attribute' => 'myField']) 

<?= $form->field($model, 'content')->widget(TinyMce::className(), [
    'options' => ['rows' => 15],
    'clientOptions' => [
        'plugins' => [
            "advlist autolink lists link charmap print preview anchor",
            "searchreplace visualblocks code fullscreen",
            "insertdatetime media table contextmenu paste image"
        ],
        'menubar' => 'edit insert view format table tools help',
        'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
    ]
]);
 ActiveForm::end(); 
 ActiveForm::end();