kaliop/kaliop-ez-remoteid-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kaliop/kaliop-ez-remoteid-bundle

Composer 安装命令:

composer require kaliop/kaliop-ez-remoteid-bundle

包简介

Bundle provides Reference tab to location view in admin panel where the remoteID can be changed by user with right permissions.

README 文档

README

Bundle adds Reference tab in location view in admin panel where the remoteID can be changed by user with right permissions.

Preview image

Instalation

composer require kaliop/kaliop-ez-remoteid-bundle
  1. Enable bundle in kernel

        public function registerBundles()
        {
            // ...
    
            $bundles = [
                // ...
    
                new Kaliop\EzRemoteIdBundle\KaliopEzRemoteIdBundle()
            ];
    
            // ...
        }
  2. Add KaliopEzRemoteIdBundle to assetic configuration.

    assetic:
        bundles:
          # ...
          - KaliopEzRemoteIdBundle
  3. Import routings in app/config/routing.yml

    kaliop_remote_id:
        resource: "@KaliopEzRemoteIdBundle/Resources/config/routing.xml"
        prefix:   /
  4. Configuration

kaliop_ez_remote_id:
    content_types:
        test:
            pattern: '/^[a-z][a-z0-9]*$/'
            max_length: 32
        test2:
            max_length: 8
            pattern: '/^[a-z][a-z0-9]*$/'
        test3:
            pattern: '/^.*$/'
            max_length: 32
        test4:
            pattern: '/^a.*b$/'
            max_length: 10
    default:
        pattern: '/^[a-z][a-z0-9]*$/'
        max_length: 32

defaults in a given example are set when this values are not provide. For example this config can be also achieved by:

kaliop_ez_remote_id:
    content_types:
        test: ~
        test2:
            max_length: 8
        test3:
            pattern: /^.*$/
        test4:
            pattern: /^a.*b$/
            max_length: 10

Note: Please keep in mind that max_length should not exceed constraints in the database tables what is 100 characters (VARCHAR(100)). This can differ from different versions of ezPlatform so it's good practice to check it with your current implementation.

Note: Invalid pattern message is in two variants. If the pattern desctiption is defined in the translation domain kaliop_ez_remote_id like the one below:

# kaliop_ez_remote_id.en.yml

pattern_description:
  '/^[a-z0-9]+$/': Value must contain only small letters and numbers.

Then the validation message is build from key kaliop_ez_remote_id.validator.remote_id_pattern.invalid and the description is available in parameter %patternDescription%. If there is not translation for the pattern then kaliop_ez_remote_id.validator.remote_id_pattern.invalid_default is used and the pattern is available in the %pattern% parameter.

kaliop_ez_remote_id:
    remote_id_pattern:
      invalid: Remote ID has invalid format. %patternDescription%
      invalid_default: Remote ID has invalid format. Value must match %pattern%.
  1. Clear cache

    php bin/console cache:clear
    
  2. Install assets

    php bin/console assets:install --symlink --relative
  3. Configure permissions by adding the right policies. The view policy is for showing the Reference tab in the location view. Edit enable user to change the remote ID.

Select new policy

Set limitations

统计信息

  • 总下载量: 200
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固