Class BlockRepository @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 25 of file BlockRepository.php.
◆ __construct()
- Parameters
-
ResourceBlock | $resource | |
BlockFactory | $blockFactory | |
Data\BlockInterfaceFactory | $dataBlockFactory | |
BlockCollectionFactory | $blockCollectionFactory | |
Data\BlockSearchResultsInterfaceFactory | $searchResultsFactory | |
DataObjectHelper | $dataObjectHelper | |
DataObjectProcessor | $dataObjectProcessor | |
StoreManagerInterface | $storeManager | |
CollectionProcessorInterface | $collectionProcessor | |
Definition at line 83 of file BlockRepository.php.
101 $this->storeManager = $storeManager;
102 $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
◆ delete()
delete |
( |
Data\BlockInterface |
$block | ) |
|
Delete Block
- Parameters
-
\Magento\Cms\Api\Data\BlockInterface | $block | |
- Returns
- bool
- Exceptions
-
Implements BlockRepositoryInterface.
Definition at line 173 of file BlockRepository.php.
176 $this->resource->delete(
$block);
177 }
catch (\Exception $exception) {
178 throw new CouldNotDeleteException(
__($exception->getMessage()));
◆ deleteById()
◆ getById()
◆ save()
save |
( |
Data\BlockInterface |
$block | ) |
|
Save Block data
- Parameters
-
\Magento\Cms\Api\Data\BlockInterface | $block | |
- Returns
- Block
- Exceptions
-
Implements BlockRepositoryInterface.
Definition at line 112 of file BlockRepository.php.
114 if (empty(
$block->getStoreId())) {
115 $block->setStoreId($this->storeManager->getStore()->getId());
119 $this->resource->save(
$block);
120 }
catch (\Exception $exception) {
121 throw new CouldNotSaveException(
__($exception->getMessage()));
◆ $blockCollectionFactory
◆ $blockFactory
◆ $dataBlockFactory
◆ $dataObjectHelper
◆ $dataObjectProcessor
◆ $resource
◆ $searchResultsFactory
The documentation for this class was generated from the following file: