Ejemplo n.º 1
0
 /**
  * Save Block data
  *
  * @param \Magento\Cms\Api\Data\BlockInterface $block
  * @return Block
  * @throws CouldNotSaveException
  */
 public function save(Data\BlockInterface $block)
 {
     $storeId = $this->storeManager->getStore()->getId();
     $block->setStoreId($storeId);
     try {
         $this->resource->save($block);
     } catch (\Exception $exception) {
         throw new CouldNotSaveException(__($exception->getMessage()));
     }
     return $block;
 }