. */ namespace SP\Modules\Web\Forms; use SP\Core\Application; use SP\Domain\Config\Ports\ConfigDataInterface; use SP\Domain\Config\Services\ConfigFile; use SP\Domain\Core\Context\Context; use SP\Domain\Http\Ports\RequestService; /** * Class FormBase * * @package SP\Modules\Web\Forms */ abstract class FormBase { protected ConfigFile $config; protected ConfigDataInterface $configData; protected Context $context; /** * FormBase constructor. * * @param Application $application * @param RequestService $request * @param int|null $itemId */ public function __construct( Application $application, protected RequestService $request, protected ?int $itemId = null ) { $this->config = $application->getConfig(); $this->configData = $this->config->getConfigData(); $this->context = $application->getContext(); } /** * @return int|null */ public function getItemId(): ?int { return $this->itemId; } }