<?php

namespace Opentalent\OtCore\Controller;

use Opentalent\OtCore\Website\OtPageRepository;
use Opentalent\OtCore\Website\OtWebsiteRepository;
use TYPO3\CMS\Core\Localization\LanguageService;

/**
 * Base class for all controllers of backend modules
 *
 * Class ActionController
 */
class ActionController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
    /**
     * @var OtWebsiteRepository
     */
    protected OtWebsiteRepository $otWebsiteRepository;

    public function injectOtWebsiteRepository(OtWebsiteRepository $otWebsiteRepository) {
        $this->otWebsiteRepository = $otWebsiteRepository;
    }

    /**
     * @var OtPageRepository
     */
    protected OtPageRepository $otPageRepository;

    public function injectOtPageRepository(OtPageRepository $otPageRepository) {
        $this->otPageRepository = $otPageRepository;
    }

    /**
     * Returns the language service.
     *
     * @return LanguageService
     */
    protected function getLanguageService()
    {
        return $GLOBALS['LANG'];
    }
}
