瀏覽代碼

Premières entités

master
Guillaume 3 年之前
父節點
當前提交
86123105b6
共有 6 個檔案被更改,包括 83 行新增6 行删除
  1. +1
    -0
      config/bundles.php
  2. +3
    -2
      config/packages/doctrine.yaml
  3. +1
    -2
      src/Entity/Address/Address.php
  4. +26
    -0
      src/Entity/PointSale/PointSale.php
  5. +2
    -2
      src/Entity/Site/Page.php
  6. +50
    -0
      src/Repository/PointSaleRepository.php

+ 1
- 0
config/bundles.php 查看文件

@@ -13,6 +13,7 @@ return [
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Lc\SovBundle\LcSovBundle::class => ['all' => true],
Lc\CaracoleBundle\LcCaracoleBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],

+ 3
- 2
config/packages/doctrine.yaml 查看文件

@@ -14,6 +14,7 @@ doctrine:
prefix: 'App\Entity'
alias: App
resolve_target_entities:
Lc\SovBundle\Model\User\UserInterface: App\Entity\User
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File
Lc\SovBundle\Model\User\UserInterface: App\Entity\User\User
Lc\SovBundle\Doctrine\Extension\FileInterface: App\Entity\File\File
Lc\CaracoleBundle\Model\Address\AddressInterface: App\Entity\Address\Address
Lc\CaracoleBundle\Model\PointSale\PointSaleInterface: App\Entity\PointSale\PointSale

+ 1
- 2
src/Entity/Address/Address.php 查看文件

@@ -4,9 +4,8 @@ namespace App\Entity\Address;

use App\Repository\AddressRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\CaracoleBundle\Model\Address\AddressModel;
use Lc\CaracoleBundle\Model\AddressAbstract;
use Lc\CaracoleBundle\Model\AddressInterface;

/**
* @ORM\Entity(repositoryClass=AddressRepository::class)

+ 26
- 0
src/Entity/PointSale/PointSale.php 查看文件

@@ -0,0 +1,26 @@
<?php

namespace App\Entity\PointSale;

use App\Repository\PointSaleRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
use Lc\CaracoleBundle\Model\PointSale\PointSaleModel;

/**
* @ORM\Entity(repositoryClass=PointSaleRepository::class)
*/
class PointSale extends PointSaleModel implements PointSaleInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;

public function getId(): ?int
{
return $this->id;
}
}

+ 2
- 2
src/Entity/Site/Page.php 查看文件

@@ -6,13 +6,13 @@ use App\Repository\PageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\EntityFullAbstract;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use App\Entity\File\File ;

/**
* @ORM\Entity(repositoryClass=PageRepository::class)
*/
class Page extends EntityFullAbstract
class Page extends AbstractFullEntity
{
/**
* @ORM\Id

+ 50
- 0
src/Repository/PointSaleRepository.php 查看文件

@@ -0,0 +1,50 @@
<?php

namespace App\Repository;

use App\Entity\PointSale;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method PointSale|null find($id, $lockMode = null, $lockVersion = null)
* @method PointSale|null findOneBy(array $criteria, array $orderBy = null)
* @method PointSale[] findAll()
* @method PointSale[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PointSaleRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, PointSale::class);
}

// /**
// * @return PointSale[] Returns an array of PointSale objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')
->setParameter('val', $value)
->orderBy('p.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?PointSale
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

Loading…
取消
儲存