Skip to content

Commit f2e7edd

Browse files
committed
Adding __toString() methods to the Language, Ctagories Entities
1 parent a831cb3 commit f2e7edd

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

module/CsnCms/src/CsnCms/Entity/Category.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class Category
5151
public function __construct() {
5252
$this->articles = new ArrayCollection();
5353
}
54+
55+
public function __toString()
56+
{
57+
return $this->ctgrName;
58+
}
5459

5560
/**
5661
* Set ctgrName

module/CsnCms/src/CsnCms/Entity/Language.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ class Language
5252
*/
5353
private $lngId;
5454

55-
55+
public function __toString()
56+
{
57+
return $this->lngName;
58+
}
59+
5660
/**
5761
* Set lngName
5862
*
@@ -65,7 +69,7 @@ public function setLngName($lngName)
6569

6670
return $this;
6771
}
68-
72+
6973
/**
7074
* Get lngName
7175
*

module/CsnCms/src/CsnCms/Entity/Resource.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class Resource
4141
*/
4242
private $rsId;
4343

44+
public function __toString()
45+
{
46+
return $this->rsName;
47+
}
4448

4549
/**
4650
* Set rsName

0 commit comments

Comments
 (0)