PHP code example of tomaskarlik / filelist
1. Go to this page and download the library: Download tomaskarlik/filelist 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/ */
tomaskarlik / filelist example snippets
namespace App\Module\SomeModule\Presenters;
use Nette\Application\UI\Presenter;
use TomasKarlik\FileList\FileListControl;
use TomasKarlik\FileList\FileListControlFactoryInterface;
final class ListPresenter extends Presenter
{
private $factory;
public function __construct(FileListControlFactoryInterface $factory)
{
$this->factory = $factory;
}
/**
* @return FileListControl
*/
protected function createComponentLogFileList()
{
$someDir = __DIR__;
return $this->factory->create($someDir);
}
}