HomeDevCentral

FilesListingController: new controller to list current files

Description

FilesListingController: new controller to list current files

This controller is intended to be used in xmlHttpRequest entry points
to return a JSON document with the URL to a list of files.

For example, to return the URLs to every .txt files in current directory:

$controller = new FilesListingController(
    get_directory(__DIR__),
    'txt'
);

$controller->query()->show();

Details

Provenance
derecksonAuthored on
Parents
rTOOLSadc296b237e6: [core] get_directory(): gets directory relative to the site root
Branches
Unknown
Tags
Unknown