getRequest()->getParam('entity_type', 'product'); } public function getEntityId(): int { return (int)$this->getRequest()->getParam('entity_id', 0); } public function getSourceStoreId(): int { $storeId = (int)$this->getRequest()->getParam('source_store_id', 0); return $storeId > 0 ? $storeId : 0; } public function getSourceStoreIdName(): string { $sourceStoreId = $this->getSourceStoreId(); if ($sourceStoreId <= 0) { return __('Default Store View')->render(); } foreach ($this->getStoreOptions() as $storeOption) { if ((int)$storeOption['store_id'] === $sourceStoreId) { return (string)$storeOption['label']; } } return __('Default Value (Store ID: %1)', $sourceStoreId)->render(); } public function getStoreOptions(): array { return $this->storeViewProvider->getStoreViewOptions(); } public function getFieldsUrl(): string { return $this->getUrl('localetranslate/translation/fields'); } public function getApplyUrl(): string { return $this->getUrl('localetranslate/translation/apply'); } public function getFormKeyValue(): string { return $this->formKeyProvider->getFormKey(); } }