ソースを参照

Livraisons : adaptations PointSale

reduction
Guillaume 4年前
コミット
b49289c083
2個のファイルの変更14行の追加10行の削除
  1. +9
    -10
      ShopBundle/Controller/Admin/AdminController.php
  2. +5
    -0
      ShopBundle/Model/PointSale.php

+ 9
- 10
ShopBundle/Controller/Admin/AdminController.php ファイルの表示

@@ -122,19 +122,18 @@ class AdminController extends EasyAdminController
}


//ça bloque tout ce truc là faut qu'on en parle

/* if (method_exists($entity, 'getAddress')) {
if (method_exists($entity, 'getAddress') && $entity->getAddress()) {
$entity->getAddress()->setCreatedBy($this->security->getUser());
$entity->getAddress()->setCreatedAt(new \DateTime());
}

if (method_exists($entity, 'getAddresses')) {
if (method_exists($entity, 'getAddresses')
&& $entity->getAddresses() && count($entity->getAddresses()) > 0) {
foreach($entity->getAddresses() as $address) {
$address->setCreatedBy($this->security->getUser()) ;
$address->setCreatedAt(new \DateTime()) ;
}
}*/
}

$this->setUpdated($entity);

@@ -150,13 +149,13 @@ class AdminController extends EasyAdminController
$entity->setUpdatedBy($this->security->getUser());
}

//ça bloque tout ce truc là faut qu'on en parle
/*
if (method_exists($entity, 'getAddress')) {
if (method_exists($entity, 'getAddress') && $entity->getAddress()) {
$entity->getAddress()->setUpdatedBy($this->security->getUser());
}

if (method_exists($entity, 'getAddresses')) {
if (method_exists($entity, 'getAddresses')
&& $entity->getAddresses() && count($entity->getAddresses()) > 0) {

foreach($entity->getAddresses() as $address) {
$address->setUpdatedBy($this->security->getUser()) ;
$address->setUpdatedAt(new \DateTime()) ;
@@ -165,7 +164,7 @@ class AdminController extends EasyAdminController
$address->setCreatedAt(new \DateTime()) ;
}
}
}*/
}
}

public function listChildrenAction()

+ 5
- 0
ShopBundle/Model/PointSale.php ファイルの表示

@@ -38,6 +38,11 @@ abstract class PointSale extends AbstractDocumentEntity
$this->pointSaleDayInfos = new ArrayCollection();
}

public function __toString()
{
return $this->getTitle() ;
}

/**
* @return Collection|Merchant[]
*/

読み込み中…
キャンセル
保存