imolinapty / h5p-bundle
Symfony 的 H5P Bundle,源自 emmedy/h5p-bundle 的分支
0.4.3
2022-07-14 20:17 UTC
Requires
- doctrine/orm: ~2.4
- guzzlehttp/guzzle: 7.x
- h5p/h5p-core: ~1.17.0
- h5p/h5p-editor: ~1.17.0
- symfony/framework-bundle: ~2.7|~3.0
This package is not auto-updated.
Last update: 2024-09-21 05:15:48 UTC
README
将 H5P 集成到 Symfony 的 Bundle。此 Bundle 是 H5P Drupal 模块的移植版本。有关 H5P 的更多信息,请访问 H5P.org
此 Bundle 在 Symfony 3.4 上进行了测试
安装
使用 composer 安装
composer require imolinapty/h5p-bundle
在 AppKernel.php
中启用 Bundle
$bundles = array( // ... new Emmedy\H5PBundle\EmmedyH5PBundle(), )
将 H5P 资产添加到 Bundle
php app/console h5p-bundle:include-assets php app/console assets:install --symlink
将所需的表和关系添加到数据库
php app/console doctrine:schema:update --force
在 routing.yml
中启用路由
emmedy_h5p.demo: resource: "@EmmedyH5PBundle/Resources/config/routing_demo.yml" prefix: / emmedy_h5p: resource: "@EmmedyH5PBundle/Resources/config/routing.yml" prefix: /
emmedy_h5p.demo 是可选的。它可以作为如何在 Symfony 中使用 H5P 的示例,并测试此 Bundle 是否正常运行。
配置
在 config.yml
中配置 Bundle。(注意 h5 和 p 之间的下划线)
emmedy_h5_p: use_permission: true # This is false by default to let the demo work out of the box. storage_dir: h5p # Location to store all H5P libraries and files web_dir: web # Location of the public web directory
有关所有配置信息,请参阅 Configuration.php
使用
首先添加一个指向您项目的虚拟主机。然后在浏览器中访问 http://<your virtualhost>/h5p/list
待办事项
尚未移植所有内容。以下内容还需要完成:
- 上传库。目前只能从 Hub 选择 H5P 默认库。
- 下载包
- 嵌入包
- 存储使用数据和积分