studit/h5p-bundle

为Symfony的H5P Bundle

安装: 50

依赖者: 0

建议者: 0

安全: 0

类型:symfony-bundle

0.3.3 2019-03-15 13:04 UTC

This package is auto-updated.

Last update: 2024-09-16 05:42:16 UTC


README

将H5P集成到Symfony的Bundle。此Bundle是H5P Drupal模块的移植。有关H5P的更多信息,请访问H5P.org

此Bundle已在Symfony 3.4上进行了测试

安装

使用composer安装

composer require studit/h5p-bundle

AppKernel.php中启用Bundle

$bundles = array(
    // ...
    new Emmedy\H5PBundle\EmmedyH5PBundle(),
)

将H5P资源添加到Bundle中

php bin/console h5p-bundle:include-assets
php bin/console assets:install --symlink

将所需的表和关系添加到数据库中

php bin/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

待办事项

尚未移植所有内容。以下内容还需要完成:

  • 下载包
  • 嵌入包
  • 存储使用数据和积分