A Pimcore 11+ bundle that provides project information from environment variables through Twig functions.
- 🏷️ Display project name from
PROJECT_NAMEenvironment variable - 🌍 Show environment information (
APP_ENV) - 🔄 Automatic environment display (adds environment to name if not production)
- 🎨 Easy Twig integration with custom functions
- ⚡ Self-configuring services (no manual setup required)
Install:
composer require vahadigital/pimcore-project-info-bundleNote: The bundle automatically registers itself via Pimcore's auto-discovery. No manual bundle configuration needed!
php bin/console cache:clearSet these variables in your .env file:
PROJECT_NAME=My Awesome Project
APP_ENV=dev{# Get project name #}
{{ project_name() }}
{# Get display name (includes environment if not prod) #}
{{ project_display_name() }}
{# Get all project info as array #}
{% set info = project_info() %}<!DOCTYPE html>
<html>
<head>
<title>{{ project_display_name() }}</title>
</head>
<body>
<h1>{{ project_name() }}</h1>
{% set info = project_info() %}
<div class="project-info">
<p>Environment: {{ info.environment }}</p>
{% if info.is_development %}
<div class="dev-warning">Development Mode</div>
{% endif %}
</div>
</body>
</html>| Function | Description | Example Output |
|---|---|---|
project_name() |
Raw project name from env | "My Project" |
project_display_name() |
Name with env (if not prod) | "My Project (DEV)" |
project_info() |
Complete info array | See below |
[
'name' => 'My Awesome Project',
'environment' => 'dev',
'display_name' => 'My Awesome Project (DEV)',
'is_production' => false,
'is_development' => true,
]pimcore-project-info-bundle/
├── src/
│ ├── ProjectInfoBundle.php # Main bundle class
│ ├── Service/
│ │ └── ProjectInfoService.php # Core logic
│ └── Twig/
│ └── ProjectInfoExtension.php # Twig functions
├── composer.json # Package definition
└── README.md # This file
- PHP 8.1+
- Pimcore 11.0+
- Twig 3.0+
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 🐛 Issues: GitHub Issues
- 📧 Email: dev@vahadigital.com
- 🌐 Website: Vaha Digital
- Initial release
- Project name and environment display
- Twig functions:
project_name(),project_display_name(),project_info() - Automatic service configuration
MIT License - see LICENSE file for details.