isidoro / jstree
PHP 组件,用于在 jstree JavaScript 插件后抽象文件系统
1.1.4
2015-11-29 16:13 UTC
Requires
- symfony/finder: ^2.7
Requires (Dev)
- phpunit/phpunit: ^4.7
This package is not auto-updated.
Last update: 2024-10-02 09:31:30 UTC
README
安装
通过 Composer
composer require isidoro/jstree
用法
Simplest usage: To get jstree showing a directory (here the defaultPathForData): $config = new JstreeConfig(array('basePath'=>'defaultPathForData/')); //this base path will be the root path for JstreeFileSystem header('Content-Type: application/json'); echo (new JstreeFileSystem('directory_to_explore',$config))->getList(); /** * Meaning: * explore the path 'defaultPathForData/directory_to_explore' * get it in the json format for the jstree plugin */ See the 'demo' directory to have a complete example (js + php) Other configuration: //to show files $config->setShowDirectories(false); //to show directories $config->setShowFiles(false); //filtering on extension //$config->setExtensionsToShowFromList('cpp;txt'); All the configurations can be set by the array passed to the JstreeConfig constructor.
变更日志
有关最近更改的详细信息,请参阅 变更日志。
贡献
有关详细信息,请参阅 贡献指南。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 mercoglianoisidoro.com 联系,而不是使用问题跟踪器。
致谢
- [isidoro][mercogliano.isidoro@gmail.com]
- [所有贡献者][link-contributors]
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件。