mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-12 07:36:34 +03:00
Merge pull request #383
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
beelab_tag:
|
||||
tag_class: App\Entity\Tag
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Beelab\\TagBundle\\BeelabTagBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<bg=blue;fg=white> Next for BeelabTagBundle </>
|
||||
* <fg=blue>Customize</> your new Tag entity
|
||||
* <fg=blue>Read</> documentation at <comment>https://github.com/Bee-Lab/BeelabTagBundle/blob/master/Resources/docs/index.md</>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Beelab\TagBundle\Tag\TagInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Table()
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class Tag implements TagInterface
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*
|
||||
* @ORM\Column()
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user