Files
espocrm/custom/Espo/Custom/Services/CKuendigung.php

25 lines
658 B
PHP

<?php
namespace Espo\Custom\Services;
use Espo\Core\Exceptions\Forbidden;
use Espo\Core\Exceptions\NotFound;
class CKuendigung extends \Espo\Services\Record
{
/**
* Initiate eviction lawsuit (Räumungsklage) from Kündigung
*
* @param string $kuendigungId
* @return array
* @throws NotFound
* @throws Forbidden
*/
public function initiateEviction(string $kuendigungId): array
{
// Delegate to CVmhRumungsklage service
$raeumungsklagenService = $this->serviceFactory->create('CVmhRumungsklage');
return $raeumungsklagenService->createFromSource('CKuendigung', $kuendigungId);
}
}