Skip to content

docs: Port "Database or entity manager" service page to 7.2#587

Open
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/docs-issue-347-database-7.2
Open

docs: Port "Database or entity manager" service page to 7.2#587
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/docs-issue-347-database-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Ports the legacy Database/entity manager guide from the archived developer-documentation repo into docs/plugin_services/database.rst, converting Markdown to RST and modernizing the example to inject EntityManagerInterface (with DBAL and ManagerRegistry alternatives). Adds ORM to the Mautic Vale vocabulary. Targets the 7.2 base branch per issue #347.

Trigger Events


Tip: Use Slack message actions (⋯ menu → Update Docs) to capture doc updates without interrupting conversations 💬

Port the legacy Database/entity manager guide from the archived
developer-documentation repo into RST, modernizing the example to
inject EntityManagerInterface. Resolves docs issue mautic#347.

Add ORM to the Mautic Vale vocabulary accept list.
.. vale on No newline at end of file
.. vale on

Doctrine provides both an ORM and a DBAL layer. To work with a bundle's repositories and entities, use the entity manager by injecting ``Doctrine\ORM\EntityManagerInterface`` into your service:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported the Database/Entity Manager content from the archived legacy _plugin_services_database.md, which documents Doctrine's ORM (doctrine.orm.default_entity_manager / Doctrine\ORM\EntityManager) and DBAL (doctrine.dbal.connection / Doctrine\DBAL\Connection) layers and the getEntities()/saveEntities() repository pattern. Modernized the example to inject EntityManagerInterface for Mautic 7.

Source: https://github.com/mautic/developer-documentation/blob/main/source/includes/_plugin_services_database.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant