Skip to content

Commit 47a5e17

Browse files
committed
LinkPhp entity
1 parent e3ab3f2 commit 47a5e17

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

src/Entity/LinkPhp.php

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use App\Repository\LinkPhpRepository;
6+
use Doctrine\ORM\Mapping as ORM;
7+
8+
#[ORM\Entity(repositoryClass: LinkPhpRepository::class)]
9+
class LinkPhp
10+
{
11+
#[ORM\Id]
12+
#[ORM\GeneratedValue]
13+
#[ORM\Column]
14+
private ?int $id = null;
15+
16+
#[ORM\Column(length: 150)]
17+
private ?string $title = null;
18+
19+
#[ORM\Column(length: 500, nullable: true)]
20+
private ?string $Description = null;
21+
22+
#[ORM\Column(length: 255)]
23+
private ?string $Url = null;
24+
25+
public function getId(): ?int
26+
{
27+
return $this->id;
28+
}
29+
30+
public function getTitle(): ?string
31+
{
32+
return $this->title;
33+
}
34+
35+
public function setTitle(string $title): static
36+
{
37+
$this->title = $title;
38+
39+
return $this;
40+
}
41+
42+
public function getDescription(): ?string
43+
{
44+
return $this->Description;
45+
}
46+
47+
public function setDescription(?string $Description): static
48+
{
49+
$this->Description = $Description;
50+
51+
return $this;
52+
}
53+
54+
public function getUrl(): ?string
55+
{
56+
return $this->Url;
57+
}
58+
59+
public function setUrl(string $Url): static
60+
{
61+
$this->Url = $Url;
62+
63+
return $this;
64+
}
65+
}

src/Repository/LinkPhpRepository.php

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace App\Repository;
4+
5+
use App\Entity\LinkPhp;
6+
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
7+
use Doctrine\Persistence\ManagerRegistry;
8+
9+
/**
10+
* @extends ServiceEntityRepository<LinkPhp>
11+
*/
12+
class LinkPhpRepository extends ServiceEntityRepository
13+
{
14+
public function __construct(ManagerRegistry $registry)
15+
{
16+
parent::__construct($registry, LinkPhp::class);
17+
}
18+
19+
// /**
20+
// * @return LinkPhp[] Returns an array of LinkPhp objects
21+
// */
22+
// public function findByExampleField($value): array
23+
// {
24+
// return $this->createQueryBuilder('l')
25+
// ->andWhere('l.exampleField = :val')
26+
// ->setParameter('val', $value)
27+
// ->orderBy('l.id', 'ASC')
28+
// ->setMaxResults(10)
29+
// ->getQuery()
30+
// ->getResult()
31+
// ;
32+
// }
33+
34+
// public function findOneBySomeField($value): ?LinkPhp
35+
// {
36+
// return $this->createQueryBuilder('l')
37+
// ->andWhere('l.exampleField = :val')
38+
// ->setParameter('val', $value)
39+
// ->getQuery()
40+
// ->getOneOrNullResult()
41+
// ;
42+
// }
43+
}

0 commit comments

Comments
 (0)