<?php

    $sortModes = [
        Cms\Classes\MediaLibrary::SORT_BY_TITLE => trans('cms::lang.media.title'),
        Cms\Classes\MediaLibrary::SORT_BY_SIZE => trans('cms::lang.media.size'),
        Cms\Classes\MediaLibrary::SORT_BY_MODIFIED => trans('cms::lang.media.last_modified')
    ];
?>

<h3 class="section"><?= e(trans('cms::lang.media.order_by')) ?></h3>

<select
    name="sorting"
    class="form-control custom-select select-no-search"
    data-control="sorting">
    <?php foreach ($sortModes as $code=>$title): ?>
        <option
            <?= $code == $sortBy ? 'selected="selected"' : '' ?>
            value="<?= $code ?>"
        ><?= e($title) ?></option>
    <?php endforeach ?>
</select>