añadida funcionalidad tipo papel generico

This commit is contained in:
2025-07-15 11:00:44 +02:00
parent 6a3a825b26
commit e69503c273
9 changed files with 125 additions and 19 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace App\Services;
use CodeIgniter\Config\BaseService;
use App\Models\Configuracion\TipoPapelGenericoModel;
class PapelService extends BaseService
{
protected TipoPapelGenericoModel $tipoPapelGenericoModel;
public function __construct()
{
$this->tipoPapelGenericoModel = model(TipoPapelGenericoModel::class);
}
public function getTipoPapelGenerico()
{
$values = $this->tipoPapelGenericoModel->findAll();
$tipoPapelGenericoList = [];
foreach ($values as $value) {
$tipoPapelGenericoList[$value->id] = lang('PapelGenerico.' . $value->clave);
}
return $tipoPapelGenericoList;
}
}