https://github.com/contentful/contentfulbundle
Symfony Bundle for the Contentful SDK.
https://github.com/contentful/contentfulbundle
contentful php symfony-bundle
Last synced: 11 months ago
JSON representation
Symfony Bundle for the Contentful SDK.
- Host: GitHub
- URL: https://github.com/contentful/contentfulbundle
- Owner: contentful
- License: mit
- Created: 2016-02-08T14:42:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T22:34:36.000Z (11 months ago)
- Last Synced: 2025-04-09T20:15:15.463Z (11 months ago)
- Topics: contentful, php, symfony-bundle
- Language: PHP
- Homepage:
- Size: 208 KB
- Stars: 33
- Watchers: 34
- Forks: 20
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ContentfulBundle
[](https://packagist.org/packages/contentful/contentful-bundle)
[](https://packagist.org/packages/contentful/contentful-bundle)
[](https://circleci.com/gh/contentful/ContentfulBundle)
[](https://packagist.org/packages/contentful/contentful-bundle)
> Symfony Bundle for the Contentful Delivery SDK. This bundle requires PHP 7.2 or higher or PHP 8.0 or higher, and Symfony 3.4 or higher. It also requires Twig to be installed.
# Setup
Add this package to your application by using [Composer](https://getcomposer.org/) and executing the following command:
``` bash
composer require contentful/contentful-bundle
```
## Add ContentfulBundle to your application
``` php
// config/bundles.php
return [
// ...
Contentful\ContentfulBundle\ContentfulBundle::class => ['dev' => true],
// ...
];
```
## Configuration example
The simplest configuration includes just the space ID and token. Add these settings to either `app/config.yml` (Symfony 3) or create `config/packages/contentful.yaml` (Symfony 4):
``` yaml
contentful:
delivery:
main:
space: cfexampleapi
token: b4c0n73n7fu1
```
You can also configure multiple clients and enable the preview mode:
``` yaml
contentful:
delivery:
main:
default: true
space: cfexampleapi
token: b4c0n73n7fu1
preview:
space: cfexampleapi
token: b4c0n73n7fu1
api: preview
```
## Documentation
[Getting Started Tutorial](https://www.contentful.com/developers/docs/php/tutorials/getting-started-with-contentful-and-symfony/)
## What is Contentful?
[Contentful](https://www.contentful.com) provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike a CMS, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management and delivery APIs, and a customizable web app that enable developers and content creators to ship digital products faster.
## License
Copyright (c) 2015-2023 Contentful GmbH. Code released under the MIT license. See [LICENSE](LICENSE) for further details.