PHP Classes

File: views/backend/media/_image.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/backend/media/_image.php   Download  
File: views/backend/media/_image.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Website Module
Add a content page management system to a site
Author: By
Last change:
Date: 1 month ago
Size: 423 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;

?>

<div class="card">
    <?= Html::img(Yii::$app->thumbnailer->get($model->url, 300, 300), [
       
'alt' => $model->filename,
       
'class' => 'img-fluid card-img-top',
       
'data-url' => $model->url,
       
'data-id' => $model->id,
    ])
   
?>
<footer class="card-footer">
        <p style="font-size: .75em; margin-bottom: 0"><?= $model->filename ?></p>
    </footer>
</div>