context = $context; } public function get_html($path = null) { if (!$path) { $path = $this->context->get_current_path(); } $fallback_images_href = $this->context->get_setup()->get('PUBLIC_HREF') . 'images/fallback/'; $cache = []; $folder = Item::get($this->context, $path, $cache); $items = $folder->get_content($cache); uasort($items, ['Item', 'cmp']); $html = '
| '; $html .= ' | Name | '; $html .= 'Last modified | '; $html .= 'Size | '; $html .= '
|---|---|---|---|
![]() | ';
$html .= 'Parent Directory | '; $html .= ''; $html .= ' | '; $html .= ' |
![]() | ';
$html .= '' . basename($item->path) . ' | '; $html .= '' . date('Y-m-d H:i', $item->date) . ' | '; $html .= '' . ($item->size !== null ? intval($item->size / 1000) . ' KB' : '' ) . ' | '; $html .= '