aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-05-12 15:02:32 +0200
committerThomas Citharel <tcit@tcit.fr>2017-05-25 19:09:52 +0200
commit22a4b20ed04a9c709fbbe3e254ad8b2d7757a38b (patch)
tree221d5cbf49107a83f223dae6afd8db8fab6ede1f /src/Wallabag/UserBundle
parent35941d57ee4d06ec3557d4b126d5f6fd263bcf3a (diff)
downloadwallabag-22a4b20ed04a9c709fbbe3e254ad8b2d7757a38b.tar.gz
wallabag-22a4b20ed04a9c709fbbe3e254ad8b2d7757a38b.tar.zst
wallabag-22a4b20ed04a9c709fbbe3e254ad8b2d7757a38b.zip
First draft for notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php21
-rw-r--r--src/Wallabag/UserBundle/Resources/views/manage.html.twig2
2 files changed, 22 insertions, 1 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php
index 3a167de7..2a8c9926 100644
--- a/src/Wallabag/UserBundle/Entity/User.php
+++ b/src/Wallabag/UserBundle/Entity/User.php
@@ -65,6 +65,11 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
65 protected $entries; 65 protected $entries;
66 66
67 /** 67 /**
68 * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Notification", mappedBy="user", cascade={"remove"})
69 */
70 protected $notifications;
71
72 /**
68 * @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", mappedBy="user", cascade={"remove"}) 73 * @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", mappedBy="user", cascade={"remove"})
69 */ 74 */
70 protected $config; 75 protected $config;
@@ -266,4 +271,20 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
266 { 271 {
267 return $this->clients; 272 return $this->clients;
268 } 273 }
274
275 /**
276 * @return ArrayCollection<NotificationInterface>
277 */
278 public function getNotifications()
279 {
280 return $this->notifications;
281 }
282
283 /**
284 * @param ArrayCollection<NotificationInterface> $notifications
285 */
286 public function setNotifications($notifications)
287 {
288 $this->notifications = $notifications;
289 }
269} 290}
diff --git a/src/Wallabag/UserBundle/Resources/views/manage.html.twig b/src/Wallabag/UserBundle/Resources/views/manage.html.twig
index c614c55f..10d8050c 100644
--- a/src/Wallabag/UserBundle/Resources/views/manage.html.twig
+++ b/src/Wallabag/UserBundle/Resources/views/manage.html.twig
@@ -3,7 +3,7 @@
3{% block title %}{{ 'user.manage.page_title'|trans }}{% endblock %} 3{% block title %}{{ 'user.manage.page_title'|trans }}{% endblock %}
4 4
5{% block content %} 5{% block content %}
6 6 {{ parent() }}
7 <div class="row"> 7 <div class="row">
8 <div class="col s12"> 8 <div class="col s12">
9 <div class="card-panel"> 9 <div class="card-panel">