Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 801 Bytes

File metadata and controls

56 lines (47 loc) · 801 Bytes

Uploadable - Uploadable behavioral extension for Doctrine 2

Yaml config example

Entity:

<?php

namespace Acme\DemoBundle\Entity

class User
{
    /**
     * @var integer
     */
    public $id;

    /**
     * @var string
     */
    public $name;

    /**
     * @var string
     */
    protected $fileKey;

    /**
     * @var mixed
     */
    protected $file;
}

Yaml:

Acme\DemoBundle\Entity\User:
    type: entity
    id:
        id:
            type: integer
            generator:
                strategy: AUTO
    fields:
        name:
            type: string
            length: 255
        fileKey:
            type: string
            length: 255
            nullable: true
            fsi:
                uploadable:
                    targetField: name