Преглед изворни кода

Correctif EntitySettingTrait

packProduct
Guillaume пре 3 година
родитељ
комит
a838204b93
3 измењених фајлова са 2 додато и 35 уклоњено
  1. +1
    -1
      Model/Merchant/MerchantModel.php
  2. +1
    -1
      Model/Section/SectionModel.php
  3. +0
    -33
      Model/Setting/EntitySettingTrait.php

+ 1
- 1
Model/Merchant/MerchantModel.php Прегледај датотеку

@@ -11,8 +11,8 @@ use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Model\Setting\EntitySettingTrait;
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface;
use Lc\SovBundle\Model\Setting\EntitySettingTrait;
use Lc\SovBundle\Model\Site\NewsInterface;
use Lc\SovBundle\Model\Site\PageInterface;
use Lc\SovBundle\Model\User\GroupUserInterface;

+ 1
- 1
Model/Section/SectionModel.php Прегледај датотеку

@@ -10,8 +10,8 @@ use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Model\Setting\EntitySettingTrait;
use Lc\CaracoleBundle\Model\Setting\SectionSettingInterface;
use Lc\SovBundle\Model\Setting\EntitySettingTrait;
use Lc\SovBundle\Model\Site\PageInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;


+ 0
- 33
Model/Setting/EntitySettingTrait.php Прегледај датотеку

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

namespace Lc\CaracoleBundle\Model\Setting;

trait EntitySettingTrait
{
public function getSetting($name)
{
if ($this->getSettings()) {
foreach ($this->getSettings() as $setting) {
if ($setting->getName() == $name) {
return $setting;
}
}
}

return false;
}

public function getSettingValue($name)
{
if ($this->getSettings()) {
foreach ($this->getSettings() as $setting) {
if ($setting->getName() == $name) {
return $setting->getValue();
}
}
}

return false;
}

}

Loading…
Откажи
Сачувај