1. Go to this page and download the library: Download tweedegolf/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/ */
tweedegolf / media-bundle example snippets
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use TweedeGolf\MediaBundle\Model\AbstractFile;
/**
* @ORM\Entity
* @ORM\Table
* @ORM\Entity(repositoryClass="TweedeGolf\MediaBundle\Entity\FileRepository")
*/
class File extends AbstractFile
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
public function getId(): int
{
return $this->id;
}
}
public function registerBundles()
{
return [
// ...
new Vich\UploaderBundle\VichUploaderBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new TweedeGolf\MediaBundle\TweedeGolfMediaBundle(),
// ...
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.