aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/AppKernel.php3
-rw-r--r--composer.json1
-rw-r--r--composer.lock168
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php10
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php6
-rw-r--r--src/Wallabag/CoreBundle/Entity/User.php4
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php3
7 files changed, 165 insertions, 30 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index d134de3c..601b52c3 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -22,7 +22,8 @@ class AppKernel extends Kernel
22 new Nelmio\ApiDocBundle\NelmioApiDocBundle(), 22 new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
23 new Nelmio\CorsBundle\NelmioCorsBundle(), 23 new Nelmio\CorsBundle\NelmioCorsBundle(),
24 new Liip\ThemeBundle\LiipThemeBundle(), 24 new Liip\ThemeBundle\LiipThemeBundle(),
25 new Wallabag\CoreBundle\WallabagCoreBundle() 25 new Wallabag\CoreBundle\WallabagCoreBundle(),
26 new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle()
26 ); 27 );
27 28
28 if (in_array($this->getEnvironment(), array('dev', 'test'))) { 29 if (in_array($this->getEnvironment(), array('dev', 'test'))) {
diff --git a/composer.json b/composer.json
index 0b162c02..0793bcab 100644
--- a/composer.json
+++ b/composer.json
@@ -74,6 +74,7 @@
74 "robmorgan/phinx": "~0.4", 74 "robmorgan/phinx": "~0.4",
75 "tecnick.com/tcpdf": "~6.2", 75 "tecnick.com/tcpdf": "~6.2",
76 "simplepie/simplepie": "~1.3.1", 76 "simplepie/simplepie": "~1.3.1",
77 "willdurand/hateoas-bundle": "1.0.*@dev",
77 "htmlawed/htmlawed": "dev-master", 78 "htmlawed/htmlawed": "dev-master",
78 "liip/theme-bundle": "1.1.3", 79 "liip/theme-bundle": "1.1.3",
79 "wallabag/PHP-Flash-Messages": "dev-master", 80 "wallabag/PHP-Flash-Messages": "dev-master",
diff --git a/composer.lock b/composer.lock
index a6102a81..f5b23280 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
4 "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 4 "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 "hash": "fd56c671d70f498ccc1996450479fbdc", 7 "hash": "a078afa674d2816ebe7f7ad333d9f3b4",
8 "packages": [ 8 "packages": [
9 { 9 {
10 "name": "doctrine/annotations", 10 "name": "doctrine/annotations",
@@ -1386,16 +1386,16 @@
1386 }, 1386 },
1387 { 1387 {
1388 "name": "michelf/php-markdown", 1388 "name": "michelf/php-markdown",
1389 "version": "1.4.1", 1389 "version": "1.5.0",
1390 "source": { 1390 "source": {
1391 "type": "git", 1391 "type": "git",
1392 "url": "https://github.com/michelf/php-markdown.git", 1392 "url": "https://github.com/michelf/php-markdown.git",
1393 "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" 1393 "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9"
1394 }, 1394 },
1395 "dist": { 1395 "dist": {
1396 "type": "zip", 1396 "type": "zip",
1397 "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", 1397 "url": "https://api.github.com/repos/michelf/php-markdown/zipball/e1aabe18173231ebcefc90e615565742fc1c7fd9",
1398 "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", 1398 "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9",
1399 "shasum": "" 1399 "shasum": ""
1400 }, 1400 },
1401 "require": { 1401 "require": {
@@ -1418,35 +1418,35 @@
1418 ], 1418 ],
1419 "authors": [ 1419 "authors": [
1420 { 1420 {
1421 "name": "John Gruber",
1422 "homepage": "http://daringfireball.net/"
1423 },
1424 {
1421 "name": "Michel Fortin", 1425 "name": "Michel Fortin",
1422 "email": "michel.fortin@michelf.ca", 1426 "email": "michel.fortin@michelf.ca",
1423 "homepage": "http://michelf.ca/", 1427 "homepage": "https://michelf.ca/",
1424 "role": "Developer" 1428 "role": "Developer"
1425 },
1426 {
1427 "name": "John Gruber",
1428 "homepage": "http://daringfireball.net/"
1429 } 1429 }
1430 ], 1430 ],
1431 "description": "PHP Markdown", 1431 "description": "PHP Markdown",
1432 "homepage": "http://michelf.ca/projects/php-markdown/", 1432 "homepage": "https://michelf.ca/projects/php-markdown/",
1433 "keywords": [ 1433 "keywords": [
1434 "markdown" 1434 "markdown"
1435 ], 1435 ],
1436 "time": "2014-05-05 02:43:50" 1436 "time": "2015-03-01 12:03:08"
1437 }, 1437 },
1438 { 1438 {
1439 "name": "monolog/monolog", 1439 "name": "monolog/monolog",
1440 "version": "1.12.0", 1440 "version": "1.13.0",
1441 "source": { 1441 "source": {
1442 "type": "git", 1442 "type": "git",
1443 "url": "https://github.com/Seldaek/monolog.git", 1443 "url": "https://github.com/Seldaek/monolog.git",
1444 "reference": "1fbe8c2641f2b163addf49cc5e18f144bec6b19f" 1444 "reference": "c41c218e239b50446fd883acb1ecfd4b770caeae"
1445 }, 1445 },
1446 "dist": { 1446 "dist": {
1447 "type": "zip", 1447 "type": "zip",
1448 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1fbe8c2641f2b163addf49cc5e18f144bec6b19f", 1448 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c41c218e239b50446fd883acb1ecfd4b770caeae",
1449 "reference": "1fbe8c2641f2b163addf49cc5e18f144bec6b19f", 1449 "reference": "c41c218e239b50446fd883acb1ecfd4b770caeae",
1450 "shasum": "" 1450 "shasum": ""
1451 }, 1451 },
1452 "require": { 1452 "require": {
@@ -1463,6 +1463,7 @@
1463 "phpunit/phpunit": "~4.0", 1463 "phpunit/phpunit": "~4.0",
1464 "raven/raven": "~0.5", 1464 "raven/raven": "~0.5",
1465 "ruflin/elastica": "0.90.*", 1465 "ruflin/elastica": "0.90.*",
1466 "swiftmailer/swiftmailer": "~5.3",
1466 "videlalvaro/php-amqplib": "~2.4" 1467 "videlalvaro/php-amqplib": "~2.4"
1467 }, 1468 },
1468 "suggest": { 1469 "suggest": {
@@ -1479,7 +1480,7 @@
1479 "type": "library", 1480 "type": "library",
1480 "extra": { 1481 "extra": {
1481 "branch-alias": { 1482 "branch-alias": {
1482 "dev-master": "1.12.x-dev" 1483 "dev-master": "1.13.x-dev"
1483 } 1484 }
1484 }, 1485 },
1485 "autoload": { 1486 "autoload": {
@@ -1505,7 +1506,7 @@
1505 "logging", 1506 "logging",
1506 "psr-3" 1507 "psr-3"
1507 ], 1508 ],
1508 "time": "2014-12-29 21:29:35" 1509 "time": "2015-03-05 01:12:12"
1509 }, 1510 },
1510 { 1511 {
1511 "name": "nelmio/api-doc-bundle", 1512 "name": "nelmio/api-doc-bundle",
@@ -2645,7 +2646,7 @@
2645 "description": "Libraries from @fivefilters.", 2646 "description": "Libraries from @fivefilters.",
2646 "homepage": "https://github.com/wallabag/Fivefilters_Libraries", 2647 "homepage": "https://github.com/wallabag/Fivefilters_Libraries",
2647 "support": { 2648 "support": {
2648 "source": "https://github.com/wallabag/Fivefilters_Libraries/tree/1.0.0", 2649 "source": "https://github.com/wallabag/Fivefilters_Libraries/tree/master",
2649 "issues": "https://github.com/wallabag/Fivefilters_Libraries/issues" 2650 "issues": "https://github.com/wallabag/Fivefilters_Libraries/issues"
2650 }, 2651 },
2651 "time": "2015-01-19 20:19:28" 2652 "time": "2015-01-19 20:19:28"
@@ -2690,7 +2691,7 @@
2690 "description": "PHP Classes for dynamically generating EPub files.", 2691 "description": "PHP Classes for dynamically generating EPub files.",
2691 "homepage": "https://github.com/wallabag/PHPePub", 2692 "homepage": "https://github.com/wallabag/PHPePub",
2692 "support": { 2693 "support": {
2693 "source": "https://github.com/wallabag/PHPePub/tree/2.1.0" 2694 "source": "https://github.com/wallabag/PHPePub/tree/master"
2694 }, 2695 },
2695 "time": "2015-01-19 11:44:19" 2696 "time": "2015-01-19 11:44:19"
2696 }, 2697 },
@@ -2727,7 +2728,7 @@
2727 "description": "A simple and smart (or stupid) php5 snippets repository", 2728 "description": "A simple and smart (or stupid) php5 snippets repository",
2728 "homepage": "https://github.com/wallabag/kriss_php5", 2729 "homepage": "https://github.com/wallabag/kriss_php5",
2729 "support": { 2730 "support": {
2730 "source": "https://github.com/wallabag/kriss_php5/tree/1.0.0" 2731 "source": "https://github.com/wallabag/kriss_php5/tree/master"
2731 }, 2732 },
2732 "time": "2015-01-18 21:21:43" 2733 "time": "2015-01-18 21:21:43"
2733 }, 2734 },
@@ -2764,7 +2765,7 @@
2764 "description": "Paginate record sets, not tied in directly to a database.", 2765 "description": "Paginate record sets, not tied in directly to a database.",
2765 "homepage": "https://github.com/wallabag/pagination", 2766 "homepage": "https://github.com/wallabag/pagination",
2766 "support": { 2767 "support": {
2767 "source": "https://github.com/wallabag/pagination/tree/1.0.0" 2768 "source": "https://github.com/wallabag/pagination/tree/master"
2768 }, 2769 },
2769 "time": "2015-01-19 09:24:39" 2770 "time": "2015-01-19 09:24:39"
2770 }, 2771 },
@@ -2810,7 +2811,7 @@
2810 "sessions" 2811 "sessions"
2811 ], 2812 ],
2812 "support": { 2813 "support": {
2813 "source": "https://github.com/wallabag/PHP-Flash-Messages/tree/1.0.0" 2814 "source": "https://github.com/wallabag/PHP-Flash-Messages/tree/master"
2814 }, 2815 },
2815 "time": "2015-01-18 19:51:55" 2816 "time": "2015-01-18 19:51:55"
2816 }, 2817 },
@@ -2864,7 +2865,7 @@
2864 "html" 2865 "html"
2865 ], 2866 ],
2866 "support": { 2867 "support": {
2867 "source": "https://github.com/wallabag/php-readability/tree/1.0.0", 2868 "source": "https://github.com/wallabag/php-readability/tree/master",
2868 "issues": "https://github.com/wallabag/php-readability/issues" 2869 "issues": "https://github.com/wallabag/php-readability/issues"
2869 }, 2870 },
2870 "time": "2015-01-19 12:25:38" 2871 "time": "2015-01-19 12:25:38"
@@ -2902,11 +2903,127 @@
2902 "description": "An experimental Mobipocket file creator in PHP.", 2903 "description": "An experimental Mobipocket file creator in PHP.",
2903 "homepage": "https://github.com/wallabag/phpMobi", 2904 "homepage": "https://github.com/wallabag/phpMobi",
2904 "support": { 2905 "support": {
2905 "source": "https://github.com/wallabag/phpMobi/tree/1.0.0" 2906 "source": "https://github.com/wallabag/phpMobi/tree/master"
2906 }, 2907 },
2907 "time": "2015-01-19 12:43:17" 2908 "time": "2015-01-19 12:43:17"
2908 }, 2909 },
2909 { 2910 {
2911 "name": "willdurand/hateoas",
2912 "version": "v2.4.0",
2913 "source": {
2914 "type": "git",
2915 "url": "https://github.com/willdurand/Hateoas.git",
2916 "reference": "89fe19ad9ce25f15323d76ac22272282ae8a9f14"
2917 },
2918 "dist": {
2919 "type": "zip",
2920 "url": "https://api.github.com/repos/willdurand/Hateoas/zipball/89fe19ad9ce25f15323d76ac22272282ae8a9f14",
2921 "reference": "89fe19ad9ce25f15323d76ac22272282ae8a9f14",
2922 "shasum": ""
2923 },
2924 "require": {
2925 "doctrine/annotations": "~1.0",
2926 "doctrine/common": "~2.0",
2927 "jms/metadata": "~1.1",
2928 "jms/serializer": "~0.13@dev",
2929 "symfony/expression-language": "~2.4"
2930 },
2931 "require-dev": {
2932 "atoum/atoum": "*@dev",
2933 "hautelook/frankenstein": "~0.1",
2934 "pagerfanta/pagerfanta": "~1.0",
2935 "phpunit/phpunit": "~3.7",
2936 "symfony/dependency-injection": "~2.0",
2937 "symfony/routing": "~2.0",
2938 "symfony/yaml": "~2.0",
2939 "twig/twig": "~1.12"
2940 },
2941 "suggest": {
2942 "symfony/routing": "To use the SymfonyRouteFactory.",
2943 "symfony/yaml": "To use yaml based configuration.",
2944 "twig/twig": "To use the Twig extensions."
2945 },
2946 "type": "library",
2947 "extra": {
2948 "branch-alias": {
2949 "dev-master": "2.4-dev"
2950 }
2951 },
2952 "autoload": {
2953 "psr-0": {
2954 "Hateoas": "src/"
2955 }
2956 },
2957 "notification-url": "https://packagist.org/downloads/",
2958 "license": [
2959 "MIT"
2960 ],
2961 "authors": [
2962 {
2963 "name": "Adrien Brault",
2964 "email": "adrien.brault@gmail.com"
2965 },
2966 {
2967 "name": "William Durand",
2968 "email": "william.durand1@gmail.com"
2969 }
2970 ],
2971 "description": "A PHP library to support implementing representations for HATEOAS REST web services",
2972 "time": "2015-02-24 15:28:33"
2973 },
2974 {
2975 "name": "willdurand/hateoas-bundle",
2976 "version": "dev-master",
2977 "target-dir": "Bazinga/Bundle/HateoasBundle",
2978 "source": {
2979 "type": "git",
2980 "url": "https://github.com/willdurand/BazingaHateoasBundle.git",
2981 "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b"
2982 },
2983 "dist": {
2984 "type": "zip",
2985 "url": "https://api.github.com/repos/willdurand/BazingaHateoasBundle/zipball/3c86e8080e8a229365a0ce91818da6fe6562376b",
2986 "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b",
2987 "shasum": ""
2988 },
2989 "require": {
2990 "jms/serializer-bundle": "~0.13",
2991 "symfony/framework-bundle": "~2.2",
2992 "willdurand/hateoas": "~2.0"
2993 },
2994 "require-dev": {
2995 "symfony/expression-language": "~2.4",
2996 "twig/twig": "~1.12"
2997 },
2998 "type": "symfony-bundle",
2999 "extra": {
3000 "branch-alias": {
3001 "dev-master": "1.0.x-dev"
3002 }
3003 },
3004 "autoload": {
3005 "psr-0": {
3006 "Bazinga\\Bundle\\HateoasBundle": ""
3007 }
3008 },
3009 "notification-url": "https://packagist.org/downloads/",
3010 "license": [
3011 "MIT"
3012 ],
3013 "authors": [
3014 {
3015 "name": "William Durand",
3016 "email": "william.durand1@gmail.com"
3017 }
3018 ],
3019 "description": "Integration of Hateoas into Symfony2.",
3020 "keywords": [
3021 "HATEOAS",
3022 "rest"
3023 ],
3024 "time": "2015-02-19 16:27:51"
3025 },
3026 {
2910 "name": "willdurand/jsonp-callback-validator", 3027 "name": "willdurand/jsonp-callback-validator",
2911 "version": "v1.1.0", 3028 "version": "v1.1.0",
2912 "source": { 3029 "source": {
@@ -4068,6 +4185,7 @@
4068 "minimum-stability": "dev", 4185 "minimum-stability": "dev",
4069 "stability-flags": { 4186 "stability-flags": {
4070 "nelmio/cors-bundle": 20, 4187 "nelmio/cors-bundle": 20,
4188 "willdurand/hateoas-bundle": 20,
4071 "htmlawed/htmlawed": 20, 4189 "htmlawed/htmlawed": 20,
4072 "wallabag/php-flash-messages": 20, 4190 "wallabag/php-flash-messages": 20,
4073 "wallabag/kriss_php5": 20, 4191 "wallabag/kriss_php5": 20,
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index e9cd8c93..cadd7e75 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -5,10 +5,12 @@ namespace Wallabag\CoreBundle\Controller;
5use Nelmio\ApiDocBundle\Annotation\ApiDoc; 5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller; 6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpFoundation\Response;
8use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 9use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Entity\Tag; 11use Wallabag\CoreBundle\Entity\Tag;
11use Wallabag\CoreBundle\Service\Extractor; 12use Wallabag\CoreBundle\Service\Extractor;
13use Hateoas\HateoasBuilder;
12 14
13class WallabagRestController extends Controller 15class WallabagRestController extends Controller
14{ 16{
@@ -72,6 +74,9 @@ class WallabagRestController extends Controller
72 throw $this->createNotFoundException(); 74 throw $this->createNotFoundException();
73 } 75 }
74 76
77 $hateoas = HateoasBuilder::create()->build();
78 $json = $hateoas->serialize($entries, 'json');
79
75 return $entries; 80 return $entries;
76 } 81 }
77 82
@@ -87,7 +92,10 @@ class WallabagRestController extends Controller
87 */ 92 */
88 public function getEntryAction(Entry $entry) 93 public function getEntryAction(Entry $entry)
89 { 94 {
90 return $entry; 95 $hateoas = HateoasBuilder::create()->build();
96 $json = $hateoas->serialize($entry, 'json');
97
98 return new Response($json, 200, array('application/json'));
91 } 99 }
92 100
93 /** 101 /**
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 937213b4..4f57eb0a 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -4,17 +4,21 @@ namespace Wallabag\CoreBundle\Entity;
4 4
5use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert; 6use Symfony\Component\Validator\Constraints as Assert;
7use Hateoas\Configuration\Annotation as Hateoas;
8use JMS\Serializer\Annotation\XmlRoot;
7 9
8/** 10/**
9 * Entry 11 * Entry
10 * 12 *
13 * @XmlRoot("entry")
11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository") 14 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
12 * @ORM\Table(name="entry") 15 * @ORM\Table(name="entry")
13 * @ORM\HasLifecycleCallbacks() 16 * @ORM\HasLifecycleCallbacks()
14 * 17 * @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())")
15 */ 18 */
16class Entry 19class Entry
17{ 20{
21 /** @Serializer\XmlAttribute */
18 /** 22 /**
19 * @var integer 23 * @var integer
20 * 24 *
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php
index ed5cfe53..5589c039 100644
--- a/src/Wallabag/CoreBundle/Entity/User.php
+++ b/src/Wallabag/CoreBundle/Entity/User.php
@@ -7,6 +7,8 @@ use Doctrine\ORM\Mapping as ORM;
7use Symfony\Component\Security\Core\User\UserInterface; 7use Symfony\Component\Security\Core\User\UserInterface;
8use Symfony\Component\Security\Core\User\AdvancedUserInterface; 8use Symfony\Component\Security\Core\User\AdvancedUserInterface;
9use Symfony\Component\Validator\Constraints as Assert; 9use Symfony\Component\Validator\Constraints as Assert;
10use JMS\Serializer\Annotation\ExclusionPolicy;
11use JMS\Serializer\Annotation\Expose;
10 12
11/** 13/**
12 * User 14 * User
@@ -14,12 +16,14 @@ use Symfony\Component\Validator\Constraints as Assert;
14 * @ORM\Table(name="user") 16 * @ORM\Table(name="user")
15 * @ORM\Entity 17 * @ORM\Entity
16 * @ORM\HasLifecycleCallbacks() 18 * @ORM\HasLifecycleCallbacks()
19 * @ExclusionPolicy("all")
17 */ 20 */
18class User implements AdvancedUserInterface, \Serializable 21class User implements AdvancedUserInterface, \Serializable
19{ 22{
20 /** 23 /**
21 * @var integer 24 * @var integer
22 * 25 *
26 * @Expose
23 * @ORM\Column(name="id", type="integer") 27 * @ORM\Column(name="id", type="integer")
24 * @ORM\Id 28 * @ORM\Id
25 * @ORM\GeneratedValue(strategy="AUTO") 29 * @ORM\GeneratedValue(strategy="AUTO")
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index bedc90d2..32394d2a 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -102,8 +102,7 @@ class EntryRepository extends EntityRepository
102 public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC') 102 public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC')
103 { 103 {
104 $qb = $this->createQueryBuilder('e') 104 $qb = $this->createQueryBuilder('e')
105 ->leftJoin('e.user', 'u') 105 ->where('e.user =:userId')->setParameter('userId', $userId);
106 ->where('u.id =:userId')->setParameter('userId', $userId);
107 106
108 if (null !== $isArchived) { 107 if (null !== $isArchived) {
109 $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', (bool) $isArchived); 108 $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', (bool) $isArchived);