Contratos desde proyectos
This commit is contained in:
@ -29,6 +29,26 @@ class Contract extends Ideal\Service
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $project_id
|
||||
* @return array
|
||||
* @throws ServiceAction\Read
|
||||
*/
|
||||
public function getByProject(int $project_id): array
|
||||
{
|
||||
try {
|
||||
return array_map([$this, 'process'], $this->contractRepository->fetchByProject($project_id));
|
||||
} catch (Implement\Exception\EmptyResult $exception) {
|
||||
throw new ServiceAction\Read(__CLASS__, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $broker_rut
|
||||
* @return array
|
||||
* @throws ServiceAction\Read
|
||||
*/
|
||||
public function getByBroker(int $broker_rut): array
|
||||
{
|
||||
try {
|
||||
|
Reference in New Issue
Block a user