Download the PHP package enterprisephp/display-bundle without Composer
On this page you can find all versions of the php package enterprisephp/display-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enterprisephp/display-bundle
More information about enterprisephp/display-bundle
Files in enterprisephp/display-bundle
Package display-bundle
Short Description This Bundle provides generate view for given object
License MIT
Homepage https://enterprisephp.github.io
Informations about the package display-bundle
EPDisplayBundle
Easily generate view for given entity/object
Very Basic Screenshot;
Related Links;
- https://github.com/ojs/ojs/issues/990
- https://github.com/ojs/ojs/blob/master/src/Ojs/CoreBundle/Service/Twig/DisplayExtension.php
- Development steps can be followed from https://github.com/behramcelen/symfony-bundle-develop
- A basic test and logic controller and view can be found in https://github.com/behramcelen/symfony-bundle-develop/blob/master/src/AppBundle/Controller/DisplayController.php#L16
- https://github.com/behramcelen/symfony-bundle-develop/blob/master/src/AppBundle/Resources/views/Display/display.html.twig#L7
Installation
Step 1: Download the Bundle
Open a command console, go to your project directory and execute the following command to download the latest version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
DisplayTrait
use DisplayTrait on which you want to display objects/entities (!important):
Configuration
Add below configs to config.yml
file:
Usage
If you do not want to any extreme things. Only display on template;
You can override all bundle configs via class annotation:
related : https://github.com/EnterprisePHP/EPDisplayBundle/blob/master/Annotation/Display.php#L11
If you exclude spesific fields of entity use Exclude annotation:
related : https://github.com/EnterprisePHP/EPDisplayBundle/blob/master/Annotation/Exclude.php
Expose field. All fields defaultly exposes but if you excluded from config but only one time you want to expose this field;
File expose with link;
Image expose with img tag;
You can spesify all configs from template as second param on display function;
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.