<?php

namespace Teknisa\Libs\Util\Repositories;

use Teknisa\Libs\Util\Utilities;

class AccessProfile {
    /**
     * @param $orgId
     * @return array
     */
    public static function getAccessProfile( $orgId ) {
        $query =  <<<SQL
                  SELECT NRPERFILACESSO AS "ID", NMPERFILACESSO AS "LABEL"
                    FROM PERFILACESSO
                   WHERE NRORG = :NRORG
                     AND IDATIVO = 'S'
SQL;


        $params = array( 'NRORG' => $orgId );
        return Utilities::getEntityManager()->getConnection()->fetchAllAssociative($query, $params);
    }
} 