mirror of
https://github.com/wallabag/wallabag.git
synced 2025-04-27 12:14:42 +00:00
Merge pull request #1529 from wallabag/v2-taggingrule-tablename
changed table name for tagging rule
This commit is contained in:
commit
da2240f9d4
9 changed files with 32 additions and 38 deletions
|
@ -10,7 +10,7 @@ use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert;
|
|||
* Tagging rule.
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TaggingRuleRepository")
|
||||
* @ORM\Table
|
||||
* @ORM\Table(name="`tagging_rule`")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class TaggingRule
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Form\DataTransformer;
|
||||
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
/**
|
||||
* Transforms a comma-separated list to a proper PHP array.
|
||||
* Example: the string "foo, bar" will become the array ["foo", "bar"]
|
||||
* Example: the string "foo, bar" will become the array ["foo", "bar"].
|
||||
*/
|
||||
class StringToListTransformer implements DataTransformerInterface
|
||||
{
|
||||
|
@ -51,7 +49,7 @@ class StringToListTransformer implements DataTransformerInterface
|
|||
public function reverseTransform($string)
|
||||
{
|
||||
if ($string === null) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
|
||||
return array_values(array_filter(array_map('trim', explode($this->separator, $string))));
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Form\Type;
|
|||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
|
||||
|
||||
class TaggingRuleType extends AbstractType
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace Wallabag\CoreBundle\Helper;
|
||||
|
||||
use RulerZ\RulerZ;
|
||||
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Tests\Helper;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
|
|
Loading…
Reference in a new issue