actualizacion

parent 8d1e2d75
......@@ -22,29 +22,14 @@ class PluParametroConfiguracionRepository extends ServiceEntityRepository
// /**
// * @return PluParametroConfiguracion[] Returns an array of PluParametroConfiguracion objects
// */
/*
public function findByExampleField($value)
public function getParametroConfiguracion($value)
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')
->andWhere('p.pcoNombre = :val')
->setParameter('val', $value)
->orderBy('p.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT)[0]
;
}
*/
/*
public function findOneBySomeField($value): ?PluParametroConfiguracion
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}
......@@ -5,7 +5,7 @@ namespace App\Utilities;
use Monolog\Logger;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\StreamHandler;
use AppBundle\Model\ParametroConfiguracionQuery;
use App\Entity\PluParametroConfiguracion;
/*
* To change this license header, choose License Headers in Project Properties.
......@@ -31,11 +31,11 @@ class Utiles {
return $log;
}
public static function getParametroConfiguracion($nombre) {
public static function getParametroConfiguracion($nombre,$em) {
$str_valor = '';
$parametro = ParametroConfiguracionQuery::create()->findOneByPcoNombre($nombre);
$parametro = $em->getRepository(PluParametroConfiguracion::class)->getParametroConfiguracion($nombre);
if ($parametro)
$str_valor = $parametro->getPcoValor();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment