* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShopBundle\Form\Admin\Configure\AdvancedParameters\Webservice; use PrestaShop\PrestaShop\Adapter\Webservice\WebserviceConfiguration; use PrestaShop\PrestaShop\Core\Form\FormDataProviderInterface; /** * This class is responsible of managing the data manipulated using forms * in "Configure > Advanced Parameters > Webservice" page. */ final class WebserviceFormDataProvider implements FormDataProviderInterface { /** * @var WebserviceConfiguration */ private $webserviceConfiguration; /** * @param WebserviceConfiguration $webserviceConfiguration */ public function __construct(WebserviceConfiguration $webserviceConfiguration) { $this->webserviceConfiguration = $webserviceConfiguration; } /** * {@inheritdoc} */ public function getData() { return $this->webserviceConfiguration->getConfiguration(); } /** * {@inheritdoc} */ public function setData(array $data) { return $this->webserviceConfiguration->updateConfiguration($data); } }