Merge pull request #1063 from wallabag/v2-rename-tags-entity

Rename Tags entity
This commit is contained in:
Jeremy 2015-02-09 15:52:10 +01:00
commit cbce162b40
4 changed files with 22 additions and 27 deletions

View file

@ -18,11 +18,6 @@ login_check:
logout: logout:
path: /logout path: /logout
#wallabag_api:
# resource: "@WallabagApiBundle/Controller/"
# type: annotation
# prefix: /api
rest : rest :
type : rest type : rest
resource : "routing_rest.yml" resource : "routing_rest.yml"

View file

@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tags; use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Service\Extractor; use Wallabag\CoreBundle\Service\Extractor;
class WallabagRestController extends Controller class WallabagRestController extends Controller
@ -206,7 +206,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function deleteEntriesTagsAction(Entry $entry, Tags $tag) public function deleteEntriesTagsAction(Entry $entry, Tag $tag)
{ {
} }
@ -229,7 +229,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function getTagAction(Tags $tag) public function getTagAction(Tag $tag)
{ {
} }
@ -242,7 +242,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function deleteTagAction(Tags $tag) public function deleteTagAction(Tag $tag)
{ {
} }
} }

View file

@ -5,28 +5,28 @@ namespace Wallabag\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* Tags * Tag
* *
* @ORM\Table(name="tags") * @ORM\Table(name="tag")
* @ORM\Entity * @ORM\Entity
*/ */
class Tags class Tag
{ {
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Column(name="id", type="integer")
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var string * @var string
* *
* @ORM\Column(name="value", type="text", nullable=true) * @ORM\Column(name="label", type="text")
*/ */
private $value; private $label;
/** /**
* Get id * Get id
@ -39,24 +39,24 @@ class Tags
} }
/** /**
* Set value * Set label
* *
* @param string $value * @param string $label
* @return Tags * @return Tag
*/ */
public function setValue($value) public function setLabel($label)
{ {
$this->value = $value; $this->label = $label;
return $this; return $this;
} }
/** /**
* Get value * Get label
* *
* @return string * @return string
*/ */
public function getValue() public function getLabel()
{ {
return $this->value; return $this->value;
} }

View file

@ -15,23 +15,23 @@ class TagsEntries
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Column(name="id", type="integer")
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="entry_id", type="integer", nullable=true) * @ORM\Column(name="entry_id", type="integer")
*/ */
private $entryId; private $entryId;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="tag_id", type="integer", nullable=true) * @ORM\Column(name="tag_id", type="integer")
*/ */
private $tagId; private $tagId;