ezsystems/platform-ui-bundle

此包已被弃用且不再维护。没有建议的替代包。

eZ Platform UI Bundle

安装次数: 261,957

依赖者: 7

建议者: 0

安全性: 0

星标: 30

关注者: 38

分支: 49

语言:JavaScript

类型:ezplatform-bundle

v2.1.1 2018-05-23 19:54 UTC

This package is auto-updated.

Last update: 2022-05-24 11:09:10 UTC


README

Build Status Downloads Latest release License

PlatformUIBundle 是一个为 eZ Platform 提供用于管理内容和管理 eZ Platform 安装的 Web 应用程序的包。

如果您发现了一个错误,请在 JIRA 中创建一个问题,并尽可能提供详细信息(重现步骤、操作系统和浏览器版本等),并在 Component/s 字段中放入 PlatformUI (Admin UI & Content IU)。在提交问题之前,您还可以查阅已打开的虫虫列表完整报告的虫虫、改进或故事列表

如果您发现了一个安全漏洞,请参阅如何在 https://doc.ez.no/Security 负责任地报告此类问题

安装

需要 eZ Platform 1.0 (2015.11) 或更高版本来运行 PlatformUI。

PlatformUI 及其依赖项默认在 eZ Platform 中安装和设置。要运行 PlatformUI,您只需在您喜欢的浏览器中打开 http://[uri_of_ez]/ez。

如果由于任何原因 PlatformUIBundle 未安装,请按照以下步骤操作

  • 从您的 eZ Platform 安装中运行 composer

    $ composer require ezsystems/platform-ui-bundle:dev-master
    
  • app/AppKernel.php 中将以下类的实例添加到已注册的包列表中

    public function registerBundles()
    {
        $bundles = array(
            // enabled bundles
            // ...
    
            new EzSystems\PlatformUIBundle\EzSystemsPlatformUIBundle(),
            new EzSystems\PlatformUIAssetsBundle\EzSystemsPlatformUIAssetsBundle(),
            new EzSystems\RepositoryFormsBundle\EzSystemsRepositoryFormsBundle(),
        );
    }
  • app/config/routing.yml 中包含 eZPlatformUIBundle 路由配置

    _ezpublishPlatformUIRoutes:
        resource: "@eZPlatformUIBundle/Resources/config/routing.yml"
  • 确保 REST API 配置为使用基于会话的认证

  • 运行以下命令

    $ php app/console assets:install --symlink
    

如果您正在 prod 环境中运行 eZ Platform,您还需要使用以下命令将 Assetic 的资产导出

php app/console assetic:dump --env=prod

完成此操作后,您可以通过访问 http://[uri_of_ez]/ez 来运行 eZ Platform UI 应用程序。

开发者任务

大多数与开发者相关的任务都可以使用 Grunt 运行,并且有多个额外的依赖项

  • 全局安装 grunt、yuidoc、bower 和 grover(通常需要 root 权限)

    # npm install -g grunt-cli yuidocjs grover bower gulp
    
  • 安装 phantomjs 版本 1.9.x

  • 从包根目录安装本地 npm 和 bower 依赖项,运行

    $ npm install
    $ bower install
    

完成此操作后,您可以使用 Grunt 注册的任何任务,其中最有趣的是

  • 运行 JavaScript 单元测试

    $ grunt test
    
  • 运行单个 JavaScript 单元测试

    $ grover --server --console Tests/js/foo/bar/somefile.html
    
  • 从这些测试生成代码覆盖率

    $ grunt coverage
    

    HTML 覆盖率报告可在 Tests/report/lcov-report/index.html 中查看。

  • 生成 JavaScript API 文档

    $ grunt doc
    
  • 或者,您还可以运行 实时文档服务器,该服务器将在 http://127.0.0.1:3000 上可用

    $ grunt livedoc
    
  • 更新自定义 AlloyEditor 皮肤

    $ composer install # or composer update
    $ cd vendor/ezsystems/platform-ui-assets-bundle/Resources/public/vendors/alloy-editor/
    $ npm install
    $ cd -
    $ grunt alloy-css
  • 测试更新自定义 AlloyEditor 皮肤与自定义 platform-ui-assets-bundle 构建之间的兼容性

    $ composer install --prefer-source
    $ cd vendor/ezsystems/platform-ui-assets-bundle/
    $ git checkout <your_branch>
    $ ./bin/prepare_release.sh -v X.Y.X
    $ git checkout vX.Y.X
    $ echo -e `cd Resources/public/vendors/alloy-editor/ && npm install`
    $ cd -
    $ grunt alloy-css

要运行 PHP 单元测试,您首先需要安装包的开发依赖项。为此,从包根目录运行

$ composer install --prefer-dist

然后,您可以使用以下命令运行单元测试

$ php vendor/bin/phpunit