5. Configuration Reference¶
The SWPRuleBundle can be configured under the swp_rule
key in your configuration file.
This section describes the whole bundle’s configuration.
5.1. Full Default Configuration¶
1 2 3 4 5 6 7 8 9 10 11 | # app/config/config.yml
swp_rule:
persistence:
orm:
enabled: true
classes:
rule:
model: SWP\Component\Rule\Model\Rule
repository: SWP\Bundle\RuleBundle\Doctrine\ORM\RuleRepository
factory: SWP\Bundle\StorageBundle\Factory\Factory
object_manager_name: ~
|
5.1.1. persistence¶
5.1.1.1. persistence
¶
5.1.1.1.1. orm
¶
1 2 3 4 5 6 # app/config/config.yml swp_rule: # .. persistence: orm: enabled: true
5.1.1.1.1.1. enabled
¶
type: boolean
default: false
If true
, ORM is enabled in the service container.
ORM can be enabled by multiple ways such as:
1 2 3 4 5 6 orm: ~ # use default configuration # or orm: true # straight way # or orm: enabled: true ... # or any other option under 'orm'
5.1.1.1.1.2. classes
¶
1 2 3 4 5 6 7 8 9 10 11 12 | # app/config/config.yml
swp_rule:
# ..
persistence:
orm:
# ..
classes:
rule:
model: SWP\Component\Rule\Model\Rule
repository: SWP\Bundle\RuleBundle\Doctrine\ORM\RuleRepository
factory: SWP\Bundle\StorageBundle\Factory\Factory
object_manager_name: ~
|
type: string
default: null
The name of the object manager. If set to null it defaults to default.
If Doctrine ORM persistence backend is enabled it will register swp.object_manager.rule
service
which is an alias for doctrine.orm.default_entity_manager
.
5.1.1.1.1.3. rule.model
¶
type: string
default: SWP\Component\Rule\Model\Rule
The FQCN of the Rule model class which is of type SWP\Component\Rule\Model\RuleInterface
.
5.1.1.1.1.4. rule.factory
¶
type: string
default: SWP\Bundle\StorageBundle\Factory\Factory
The FQCN of the Rule Factory class.
5.1.1.1.1.5. rule.repository
¶
type: string
default: SWP\Bundle\RuleBundle\Doctrine\ORM\RuleRepository
The FQCN of the Rule Repository class.
5.1.1.1.1.6. rule.object_manager_name
¶
type: string
default: null
The name of the object manager. If set to null it defaults to default.
If Doctrine ORM persistence backend is enabled it will register swp.object_manager.rule
service
which is an alias for doctrine.orm.default_entity_manager
.