-
-
Save fayqLs/8445d6832d1aae37129e325f91e35468 to your computer and use it in GitHub Desktop.
APLICAR FILTRO OPERADOR IN DOS IDs NO DATAGRID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function onReload($param = NULL) | |
{ | |
$systemUser = SystemUsers::find(TSession::getValue('userid')); | |
if ($systemUser) | |
{ | |
$arrayEmpresaID = array(); | |
$EmpresasUuario = $systemUser->getEmpresasUuario(); | |
if ($EmpresasUuario) | |
{ | |
foreach ($EmpresasUuario as $empresa) | |
{ | |
$arrayEmpresaID[] = $empresa->empresa_id; | |
} | |
} | |
if (count($arrayEmpresaID)) | |
{ | |
$criteria->add(new TFilter('empresa_id', 'in', $arrayEmpresaID)); | |
} | |
} | |
$objects = $repository->load($criteria, FALSE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment