PHP code example of symkit / media-bundle
1. Go to this page and download the library: Download symkit/media-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/ */
symkit / media-bundle example snippets
return [
// ...
Symkit\MediaBundle\SymkitMediaBundle::class => ['all' => true],
];
use Symkit\MediaBundle\Entity\Media;
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private ?Media $image = null;
use Symkit\MediaBundle\Form\MediaType;
$builder->add('image', MediaType::class);