Contributte Doctrine-gedmo

Website 🚀 contributte.org | Contact 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

# Disclaimer

⚠️ This project is no longer being maintained. Please use nettrine/extensions-atlantic18 (opens new window).
Composer nettrine/extensions (opens new window)
Version
PHP
License

# Documentation

Doctrine (Atlantic18/DoctrineExtensions (opens new window)) extension for Nette Framework.

# Setup

  1. First of all, ensure you have installed nettrine/dbal (opens new window) and Nettrine ORM (opens new window) packages.

  2. Configure Nette DI extension.

// config/config.neon
extensions:
  nettrine.extensions.atlantic18: Nettrine\Extensions\Atlantic18\DI\Atlantic18BehaviorExtension
1
2
3

# Configuration

By default all listeners are disabled, enable only required listeners.

nettrine.extensions.atlantic18:
	loggable: off
	sluggable: off
	softDeleteable: off
	treeable: off
	blameable: off
	timestampable: off
	translatable: off
	uploadable: off
	sortable: off
	ipTraceable: off
1
2
3
4
5
6
7
8
9
10
11

# Loggable, Translatable, Treeable

Setup extra entity mapping.

extensions:
	orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension

orm.annotations:
	paths:
		# your app entities
		- App/Model/Database/Entity
		# doctrine extensions entities
		- Gedmo\Loggable\Entity
		- Gedmo\Loggable\Entity
		- Gedmo\Tree\Entity
1
2
3
4
5
6
7
8
9
10
11

If you using nettrine/dbal all listeners are registered automatically, or you have to register it manually:

// Get EventManager, from DI or Entity Manager
$evm = $em->getEventManager();

// Register desired listener to event
$evm->addEventSubscriber($listener);

1
2
3
4
5
6

# Translatable (opens new window)

TranslatableListener has a complex configuration:

nettrine.extensions.atlantic18:
	translatable:
		translatable: cs_CZ
		default: cs_CZ
		translationFallback: off
		persistDefaultTranslation: off
		skipOnLoad: off
1
2
3
4
5
6
7

# IpTraceable (opens new window)

IpTraceable requires client IP address:

nettrine.extensions.atlantic18:
	ipTraceable:
		ipValue: @Nette\Http\IRequest::getRemoteAddress()
1
2
3

# Development

This package was maintain by these authors.


Consider to support (opens new window) contributte development team. Also thank you for being used this package.