Skip to content

Commit c2636b0

Browse files
committed
DOCSP-39181: drupal integration page
1 parent c8ab94e commit c2636b0

4 files changed

Lines changed: 135 additions & 38 deletions

File tree

source/php-drivers.txt

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ MongoDB PHP Driver
2020
:titlesonly:
2121

2222
Laravel MongoDB <https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current>
23-
/php-frameworks/symfony
24-
/php-libraries
23+
Symfony Integration </php-frameworks/symfony>
24+
Drupal Integration </php-frameworks/drupal>
25+
Libraries, Frameworks, & Tools </php-libraries>
2526

2627
.. contents:: On this page
2728
:local:
@@ -36,44 +37,32 @@ Welcome to the documentation site for the official MongoDB PHP driver.
3637
You can add the driver to your application to work with MongoDB in PHP.
3738
The MongoDB PHP Driver consists of the following components:
3839

39-
- The `extension <https://github.com/mongodb/mongo-php-driver>`__, which
40-
provides a low-level API and mainly serves to integrate
41-
`libmongoc and libbson <https://www.mongodb.com/docs/languages/c/c-driver/current/>`__ with
42-
PHP.
40+
- `Extension <https://php.net/mongodb>`__:
41+
Provides a low-level API and mainly serves to integrate
42+
the `C Driver <https://www.mongodb.com/docs/languages/c/c-driver/current/>`__
43+
`libmongoc <https://mongoc.org/libmongoc/current/>`__ and
44+
`libbson <https://mongoc.org/libbson/current/>`__ libraries with PHP.
4345

44-
- The `library <https://www.mongodb.com/docs/php-library/current>`__, which
45-
provides a high-level API for working with MongoDB
46+
- `Library <https://www.mongodb.com/docs/php-library/current>`__:
47+
Provides a high-level API for working with MongoDB
4648
databases consistent with other MongoDB language drivers.
4749

4850
While it is possible to use the extension alone, MongoDB recommends
4951
using both the extension and the library together. To learn more about
50-
the components of the PHP driver, see the :ref:`Driver Architecture
51-
<php-driver-arch>` section of this page.
52+
the components of the PHP driver, see the :ref:`php-driver-arch` section
53+
of this page.
5254

5355
Navigate through the following links to learn more about the driver and access
5456
tutorial content on setting up a runnable project:
5557

56-
- `Tutorials <https://www.mongodb.com/docs/php-library/current/tutorial>`__
58+
- `Get Started with the PHP Library <https://www.mongodb.com/docs/php-library/current/get-started/>`__
59+
- `Connect to MongoDB <https://www.mongodb.com/docs/php-library/current/connect/>`__
5760

58-
- `Extension Architecture and Internals <https://www.php.net/manual/en/mongodb.architecture.php>`__
61+
Reference
62+
~~~~~~~~~
5963

60-
- Documentation
61-
62-
- `Library <https://www.mongodb.com/docs/php-library/current>`__
63-
64-
- `Extension <https://php.net/mongodb>`__
65-
66-
- Changelog
67-
68-
- `Library <https://github.com/mongodb/mongo-php-library/releases>`__
69-
70-
- `Extension <https://github.com/mongodb/mongo-php-driver/releases>`__
71-
72-
- Source Code
73-
74-
- `Library <https://github.com/mongodb/mongo-php-library>`__
75-
76-
- `Extension <https://github.com/mongodb/mongo-php-driver>`__
64+
- :github:`Release Notes <mongodb/mongo-php-driver/releases>`
65+
- :github:`Driver Source Code <mongodb/mongo-php-driver>`
7766

7867
.. _php-driver-arch:
7968

@@ -245,9 +234,3 @@ The first column lists the driver versions.
245234
.. include:: /includes/about-driver-compatibility.rst
246235

247236
.. include:: /includes/help-links-php.rst
248-
249-
See Also
250-
--------
251-
252-
- :ref:`php-libraries-frameworks-and-tools`
253-

source/php-frameworks/drupal.txt

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. _php-drupal-integration:
2+
3+
==========================
4+
Drupal MongoDB Integration
5+
==========================
6+
7+
.. facet::
8+
:name: genre
9+
:values: tutorial
10+
11+
.. meta::
12+
:keywords: php framework, code example, CMS, web app, authentication
13+
14+
.. contents:: On this page
15+
:local:
16+
:backlinks: none
17+
:depth: 2
18+
:class: singlecol
19+
20+
Overview
21+
--------
22+
23+
In this guide, you can learn about the benefits of using MongoDB Atlas
24+
as the database for Drupal sites and navigate to a tutorial that
25+
demonstrates how to set up the MongoDB driver for Drupal.
26+
27+
`Drupal <https://www.drupal.org/about>`__ is an open-source web content
28+
management system (CMS) written in PHP. Drupal provides simple content
29+
authoring, composability, and robust authentication features.
30+
31+
The :ref:`php-drupal-tutorial` section of this guide links to a tutorial
32+
which you can follow to set up a Drupal site that connects to MongoDB Atlas.
33+
34+
The :ref:`php-drupal-resources` section contains links to resources and
35+
documentation for further learning.
36+
37+
Why Use MongoDB as the Database for Drupal Sites?
38+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39+
40+
Websites that seek to provide personalized user experiences must contain
41+
robust capabilities for user authentication. Sites that have many
42+
authenticated users might face performance impacts due to the complexity
43+
of retrieving entity data from multiple tables in a relational database.
44+
MongoDB supports eliminates the need for complicated table joins and
45+
thus increases data retrieval speed, enhancing user experience with
46+
components such as personalized dashboards and dynamic content feeds.
47+
48+
When you use MongoDB as your site's database, Drupal stores entity
49+
instances as JSON objects that contain all revisions, translations, and
50+
field data. This flexible data structure decreases latency and allows
51+
Drupal to support personalized, user-focused experiences.
52+
53+
MongoDB offers the following features that improve your Drupal sites:
54+
55+
- Horizontal scaling: Distribute loads across multiple
56+
servers, making your database scalable for large user bases.
57+
58+
- Integrated file storage: Store user files directly in the
59+
database instead of on the web server, simplifying hosting.
60+
61+
- Full-Text search: Avoid implementing separate search
62+
solutions by leveraging the :atlas:`Atlas Search
63+
</atlas-search/atlas-search-overview/>` feature.
64+
65+
- AI capabilities: Perform vector searches and integrate AI services by
66+
using the :atlas:`Atlas Vector Search
67+
</atlas-vector-search/vector-search-overview/>` feature.
68+
69+
.. _php-drupal-tutorial:
70+
71+
Tutorial
72+
--------
73+
74+
To learn how to install the MongoDB driver for Drupal and set up a site
75+
that uses MongoDB Atlas as its database, see the
76+
`How to Run Drupal on MongoDB <https://dev.to/mongodb/how-to-install-drupal-on-mongodb-atlas-2dg3>`__
77+
tutorial on the DEV Community website.
78+
79+
This tutorial demonstrates how to perform the following steps:
80+
81+
1. Setting up a MongoDB Atlas account and deployment.
82+
83+
#. Setting up an AWS EC2 medium instance.
84+
85+
#. Connecting the EC2 instance to Atlas.
86+
87+
#. Installing the following components:
88+
89+
- Apache web server
90+
- MongoDB PHP Extension
91+
- Drupal web server
92+
- Drupal core patch
93+
94+
#. Connecting your Drupal site to Atlas.
95+
96+
#. Adding content to Drupal and viewing how it is stored in Atlas.
97+
98+
#. Safely shutting down your web server.
99+
100+
.. _php-drupal-resources:
101+
102+
Resources
103+
---------
104+
105+
Learn more about Drupal and MongoDB by viewing the following resources:
106+
107+
- `MongoDB module suite for Drupal <https://www.drupal.org/project/mongodb>`__
108+
- `Drupal CMS User Guide <https://new.drupal.org/docs/drupal-cms>`__
109+
- :website:`Podcast: PHP, Drupal and MongoDB with David Bekker
110+
</developer/podcasts/ep-185-php-drupal-and-mongodb-with-david-bekker/>`

source/php-frameworks/symfony.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ read about the benefits of using Symfony to build
2626
web applications with MongoDB as your database and practice using libraries
2727
that simplify querying MongoDB.
2828

29-
Symfony is a flexible and highly configurable framework for building PHP
30-
applications. You can use this framework to create reusable components
31-
to streamline your web app.
29+
`Symfony <https://symfony.com/>`__ is a flexible and highly configurable
30+
framework for building PHP applications. You can use this framework to
31+
create reusable components to streamline your web app.
3232

3333
The :ref:`php-symfony-qs` section of this guide contains a tutorial
3434
which you can follow to build a single page app that accesses data from

source/php-libraries.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Framework Integrations
5858
types of Drupal data in MongoDB. The ``mongodb`` extension supports
5959
Drupal 8 and later.
6060

61+
- :ref:`php-drupal-integration` describes the benefits of using MongoDB
62+
as a data store in a Drupal site and provides useful links to learn
63+
about using this integration.
64+
6165
- Laravel
6266

6367
- `Laravel MongoDB <https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/>`__

0 commit comments

Comments
 (0)