Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
cedf001c
Commit
cedf001c
authored
Aug 22, 2020
by
SpinShare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename badge to card
parent
a47b625f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
src/Entity/Card.php
src/Entity/Card.php
+9
-9
src/Entity/UserCard.php
src/Entity/UserCard.php
+8
-8
No files found.
src/Entity/
Badge
.php
→
src/Entity/
Card
.php
View file @
cedf001c
...
@@ -7,9 +7,9 @@ use Doctrine\Common\Collections\Collection;
...
@@ -7,9 +7,9 @@ use Doctrine\Common\Collections\Collection;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
/**
* @ORM\Entity(repositoryClass="App\Repository\
Badge
Repository")
* @ORM\Entity(repositoryClass="App\Repository\
Card
Repository")
*/
*/
class
Badge
class
Card
{
{
/**
/**
* @ORM\Id()
* @ORM\Id()
...
@@ -34,7 +34,7 @@ class Badge
...
@@ -34,7 +34,7 @@ class Badge
private
$icon
;
private
$icon
;
/**
/**
* @ORM\OneToMany(targetEntity="App\Entity\User
Badge", mappedBy="badge
")
* @ORM\OneToMany(targetEntity="App\Entity\User
Card", mappedBy="card
")
*/
*/
private
$users
;
private
$users
;
...
@@ -85,30 +85,30 @@ class Badge
...
@@ -85,30 +85,30 @@ class Badge
}
}
/**
/**
* @return Collection|User
Badge
[]
* @return Collection|User
Card
[]
*/
*/
public
function
getUsers
()
:
Collection
public
function
getUsers
()
:
Collection
{
{
return
$this
->
users
;
return
$this
->
users
;
}
}
public
function
addUser
(
User
Badge
$user
)
:
self
public
function
addUser
(
User
Card
$user
)
:
self
{
{
if
(
!
$this
->
users
->
contains
(
$user
))
{
if
(
!
$this
->
users
->
contains
(
$user
))
{
$this
->
users
[]
=
$user
;
$this
->
users
[]
=
$user
;
$user
->
set
Badge
(
$this
);
$user
->
set
Card
(
$this
);
}
}
return
$this
;
return
$this
;
}
}
public
function
removeUser
(
User
Badge
$user
)
:
self
public
function
removeUser
(
User
Card
$user
)
:
self
{
{
if
(
$this
->
users
->
contains
(
$user
))
{
if
(
$this
->
users
->
contains
(
$user
))
{
$this
->
users
->
removeElement
(
$user
);
$this
->
users
->
removeElement
(
$user
);
// set the owning side to null (unless already changed)
// set the owning side to null (unless already changed)
if
(
$user
->
get
Badge
()
===
$this
)
{
if
(
$user
->
get
Card
()
===
$this
)
{
$user
->
set
Badge
(
null
);
$user
->
set
Card
(
null
);
}
}
}
}
...
...
src/Entity/User
Badge
.php
→
src/Entity/User
Card
.php
View file @
cedf001c
...
@@ -5,9 +5,9 @@ namespace App\Entity;
...
@@ -5,9 +5,9 @@ namespace App\Entity;
use
Doctrine\ORM\Mapping
as
ORM
;
use
Doctrine\ORM\Mapping
as
ORM
;
/**
/**
* @ORM\Entity(repositoryClass="App\Repository\User
Badge
Repository")
* @ORM\Entity(repositoryClass="App\Repository\User
Card
Repository")
*/
*/
class
User
Badge
class
User
Card
{
{
/**
/**
* @ORM\Id()
* @ORM\Id()
...
@@ -17,10 +17,10 @@ class UserBadge
...
@@ -17,10 +17,10 @@ class UserBadge
private
$id
;
private
$id
;
/**
/**
* @ORM\ManyToOne(targetEntity="App\Entity\
Badge
", inversedBy="users")
* @ORM\ManyToOne(targetEntity="App\Entity\
Card
", inversedBy="users")
* @ORM\JoinColumn(nullable=false)
* @ORM\JoinColumn(nullable=false)
*/
*/
private
$
badge
;
private
$
card
;
/**
/**
* @ORM\Column(type="date")
* @ORM\Column(type="date")
...
@@ -32,14 +32,14 @@ class UserBadge
...
@@ -32,14 +32,14 @@ class UserBadge
return
$this
->
id
;
return
$this
->
id
;
}
}
public
function
get
Badge
()
:
?
Badge
public
function
get
Card
()
:
?
Card
{
{
return
$this
->
badge
;
return
$this
->
card
;
}
}
public
function
set
Badge
(
?
Badge
$badge
)
:
self
public
function
set
Card
(
?
Card
$card
)
:
self
{
{
$this
->
badge
=
$badge
;
$this
->
card
=
$card
;
return
$this
;
return
$this
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment