It is easy issue for custom entities where I can add annotations
PHP
1
2
3
4
5
6
7
8
9
10
11
*@Config(
*defaultValues={
*"tag"={
*"enabled"=true
*},
*"attachment"={
*"enabled"=true,
*"maxsize"=50
*},
*}
*)
BusinessUnit is ORO entity ( vendor/Oro/Bundle/OrganizationBundle/Entity/BusinessUnit.php) and it is a very bad practice to edit it but I can’t find another.
Can you recommend some better solution of this problem?
I found another solution maybe it will be useful for other. I modified bundle’s install script to enable Tags and Attachments for BusinessUnit after config:update
PHP
1
2
3
4
php app/console oro:entity-config:update--force
#This commands enable tags and attachment for BusinessUnit
So after every deploy and update with force, Tags and Attachments are always enabled.
Then I found another bad thing. When we disable Tags (in ‘entity manager’ or after ‘php app/console oro:entity-config:update –force’) all tags that we had set for BusinessUnits disapeared from them. I found that Tag’s relation deleted in Tag’s Entity listener – class EntityConfigListener, function postFlush (oro/platform/src/Oro/Bundle/TagBundle/EventListener/EntityConfigListener.php) So I decided to overwrite this listener and extend TagBundle
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.