定制 spotlab/doctrine-extensions 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

spotlab/doctrine-extensions

Composer 安装命令:

composer require spotlab/doctrine-extensions

包简介

Doctrine2 behavioral extensions

README 文档

README

Version 1.0.0

  • Nationalities available for "en" and "fr" locales

Extensions and Documentation

This package contains extensions that offer new functionalities. List of extensions:

  • Nationality - this extension allows to create a new "Nationality" field. It gives access to a new assert and form field type. It uses the Intl locale and save data as indexes in the same format.

Installation

Download with composer

composer require spotlab/doctrine-extensions

Usage

Ex. Nationality Form Type Integration

In your form:

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder->add('nationality', NationalityType::class, array(
                'label' => 'user.label.nationality',
                'required' => true,
            ))
            // ...

Ex. Nationality Validator config

Add in your services.yml:

spotlab.validator.Nationality:
    class: Spotlab\Validator\Constraints\NationalityValidator
    tags:
        - { name: validator.constraint_validator, alias: NationalityValidator }

Ex. Nationality Assert usage

In your entity:

/**
 * @ORM\Column(type="string", length=2)
 * @SpotlabAssert\Nationality()
 */
protected $nationality;

License

This code is under MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固