chamilo /
chamilo-lms
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | /* For licensing terms, see /license.txt */ |
||
| 6 | |||
| 7 | namespace Chamilo\CourseBundle\Entity; |
||
| 8 | |||
| 9 | use Chamilo\CoreBundle\Entity\AbstractResource; |
||
| 10 | use Chamilo\CoreBundle\Entity\ResourceInterface; |
||
| 11 | use Chamilo\CourseBundle\Repository\CChatConversationRepository; |
||
| 12 | use Doctrine\ORM\Mapping as ORM; |
||
| 13 | use Stringable; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * CChatConversation. |
||
| 17 | */ |
||
| 18 | #[ORM\Table(name: 'c_chat_conversation')] |
||
| 19 | #[ORM\Entity(repositoryClass: CChatConversationRepository::class)] |
||
| 20 | class CChatConversation extends AbstractResource implements ResourceInterface, Stringable |
||
| 21 | { |
||
| 22 | #[ORM\Column(name: 'id', type: 'integer')] |
||
| 23 | #[ORM\Id] |
||
| 24 | #[ORM\GeneratedValue] |
||
| 25 | protected ?int $id = null; |
||
| 26 | |||
| 27 | #[ORM\Column(name: 'title', type: 'string', length: 255, nullable: true)] |
||
| 28 | protected ?string $title = null; |
||
| 29 | |||
| 30 | public function __toString(): string |
||
| 31 | { |
||
| 32 | return $this->getTitle(); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getId(): int |
||
| 36 | { |
||
| 37 | return $this->id; |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 38 | } |
||
| 39 | |||
| 40 | public function getTitle(): string |
||
| 41 | { |
||
| 42 | return $this->title; |
||
|
0 ignored issues
–
show
|
|||
| 43 | } |
||
| 44 | |||
| 45 | public function setTitle(string $title): self |
||
| 46 | { |
||
| 47 | $this->title = $title; |
||
| 48 | |||
| 49 | return $this; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Resource identifier. |
||
| 54 | */ |
||
| 55 | public function getResourceIdentifier(): int |
||
| 56 | { |
||
| 57 | return $this->getId(); |
||
| 58 | } |
||
| 59 | |||
| 60 | public function getResourceName(): string |
||
| 61 | { |
||
| 62 | return $this->getTitle(); |
||
| 63 | } |
||
| 64 | |||
| 65 | public function setResourceName(string $name): self |
||
| 66 | { |
||
| 67 | return $this->setTitle($name); |
||
| 68 | } |
||
| 69 | } |
||
| 70 |