Skip to content

Commit

Permalink
[BUGFIX] Fix typo and include missing namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Riiiad committed Dec 12, 2023
1 parent 78ecae7 commit 6008f26
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions Classes/Controller/JobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter;
use TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry;
use TYPO3\CMS\Extbase\Service\ImageService;
use TYPO3\CMS\Backend\Routing\UriBuilder as BackendUriBuilder;

class JobController extends ActionController
{
Expand All @@ -28,7 +29,8 @@ public function __construct(
private readonly JobRepository $jobRepository,
private readonly ContactRepository $contactRepository,
private readonly PersistenceManagerInterface $persistenceManager,
private readonly ImageService $imageService
private readonly ImageService $imageService,
protected readonly BackendUriBuilder $backendUriBuilder,
) {
}

Expand Down Expand Up @@ -163,7 +165,7 @@ public function saveJobAction(Job $job): void
$afterSaveJobEvent = new AfterSaveJobEvent($job);
$this->eventDispatcher->dispatch($afterSaveJobEvent);

$this->sendEmail($jobs->getUid());
$this->sendEmail($job->getUid());

$this->redirect('list');
}
Expand All @@ -182,17 +184,17 @@ public function sendEmail(int $recordId): void
public function buildUrl(int $recordId): string
{
$path = $this->backendUriBuilder
->buildUriFromRoute(
'record_edit',
[
'edit' => [
'tx_academicjobs_domain_model_job' => [
$recordId => 'edit'
]
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]
);
->buildUriFromRoute(
'record_edit',
[
'edit' => [
'tx_academicjobs_domain_model_job' => [
$recordId => 'edit'
]
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]
);

return GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . $path;
}
Expand Down

0 comments on commit 6008f26

Please sign in to comment.