mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadida funcionalidad tipo papel generico
This commit is contained in:
27
ci4/app/Services/PapelService.php
Normal file
27
ci4/app/Services/PapelService.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user