定制 apploud/nette-doctrine-translatable 二次开发

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

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

apploud/nette-doctrine-translatable

最新稳定版本:v0.5.0

Composer 安装命令:

composer require apploud/nette-doctrine-translatable

包简介

Extension for Nette framework that simplifies translating of Doctrine entities.

README 文档

README

Translatable behaviour extension for Doctrine2 as Nette extension

Build Status

Installation

The best way to install TranslationsConverter is using Composer:

$ composer require apploud/nette-doctrine-translatable

You can enable the extension using your neon config.

extensions:
	translatable: Apploud\Doctrine\Translatable\DI\TranslatableExtension

You also need to have an instance of Doctrine\ORM\EntityManager defined as a service with autowiring turned on (or pass it in configuration).

Configuration

Configuration example with all possible settings:

translatable:
	entityManager: @doctrine.entityManager
	defaultLocale: defaultLocale
	currentLocale: currentLocale
	fallbackLocale: fallbackLocale
	currentLocaleResolver: [@resolverService, 'getCurrentLocale']
	fallbackLocaleResolver: [@resolverService, 'getFallbackLocale']

All settings are optional. If entityManager is missing, it will be autowired. Any other value defaults to NULL. Locale resolver can be any callable.

When determining current and fallback locales, priorities are:

  1. locale value
  2. value from locale resolver
  3. default locale

Usage

See documentation of doctrine-translatable

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2016-11-14