PHP code example of enterprisephp / display-bundle
1. Go to this page and download the library: Download enterprisephp/display-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
enterprisephp / display-bundle example snippets
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new EP\DisplayBundle\EPDisplayBundle(),
);
// ...
}
// ...
}
namespace AppBundle\Entity;
use EP\DisplayBundle\Entity\DisplayTrait;
class MyEntity
{
use DisplayTrait;
}
namespace AppBundle\Entity;
use EP\DisplayBundle\Annotation as Display;
class DummyEntity
{
/**
* @Display\Exclude
*/
protected $unPublicfieldForOnlyThisEntity;
namespace AppBundle\Entity;
use EP\DisplayBundle\Annotation as Display;
class DummyEntity
{
/**
* @Display\Expose
*/
protected $oneTimeExposeField;
namespace AppBundle\Entity;
use EP\DisplayBundle\Annotation as Display;
class DummyEntity
{
/**
* @Display\File(path="uploads/files")
*/
protected $mainFile;
namespace AppBundle\Entity;
use EP\DisplayBundle\Annotation as Display;
class DummyEntity
{
/**
* @Display\Image(
* path="uploads/files",
* height="50",
* width="70",
* )
*/
protected $cover;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.