63 private function getValidator()
65 if (
null === $this->validator) {
70 return $this->validator;
78 return $this->configStorage->load($scope, $scopeId);
90 __(
"The config can't be saved because it's empty. Complete the config and try again.")
94 $this->getValidator()->validate($designConfig);
96 $this->configStorage->save($designConfig);
97 $this->reinitableConfig->reinit();
100 return $designConfig;
108 if (!($designConfig->getExtensionAttributes() &&
109 $designConfig->getExtensionAttributes()->getDesignConfigData())
112 __(
"The config can't be saved because it's empty. Complete the config and try again.")
116 $this->configStorage->delete($designConfig);
117 $this->reinitableConfig->reinit();
120 return $designConfig;
130 $this->indexerRegistry->get(DesignConfig::DESIGN_CONFIG_GRID_INDEXER_ID)->reindexAll();
__construct(ConfigStorage $configStorage, ReinitableConfigInterface $reinitableConfig, IndexerRegistry $indexerRegistry)
save(DesignConfigInterface $designConfig)
getByScope($scope, $scopeId)