Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

symfony create form multiple entities

// src/Entity/Task.php
namespace AppEntity;

use DoctrineCommonCollectionsArrayCollection;
use DoctrineCommonCollectionsCollection;

class Task
{
    protected $description;
    protected $tags;

    public function __construct()
    {
        $this->tags = new ArrayCollection();
    }

    public function getDescription(): string
    {
        return $this->description;
    }

    public function setDescription(string $description): void
    {
        $this->description = $description;
    }

    public function getTags(): Collection
    {
        return $this->tags;
    }
}
Source by symfony.com #
 
PREVIOUS NEXT
Tagged: #symfony #create #form #multiple #entities
ADD COMMENT
Topic
Name
3+3 =