As a Magento develop I would like to have a @api interface to get CMS pages and blocks by identifiers and store id.
Existing API of the CMS module provides an ability to:
BlockRepositoryInterface::get, PageRepositoryInterface::get) BlockRepositoryInterface::search, PageRepositoryInterface::search) BlockManagementInterface and PageManagementInterface to provide an ability get CMS pages and blocks by identifiers and store id.namespace Magento\Cms\Model;
/**
* @api
*/
interface BlockManagementInterface
{
/**
* Load Block data by given Block identifier.
*
* @param string $identifier
* @param int|null $storeId
* @return \Magento\Cms\Api\Data\BlockInterface
*/
public function getByIdentifier($identifier, $storeId = null);
}
namespace Magento\Cms\Model;
/**
* @api
*/
interface PageManagementInterface
{
/**
* Load Page data by given Page identifier.
*
* @param string $identifier
* @param int|null $storeId
* @return \Magento\Cms\Api\Data\PageInterface
*/
public function getByIdentifier($identifier, $storeId = null);
}
Note: All new @api classes must be covered with the tests
@okorshenko if no one will grab it before next week you can assign it to me. I should have some time to work on it next weekend.
@okorshenko I'll have time to work on it. If you could assign it to me.
@damiantomczak
Hi @damiantomczak thank you for working on this. Closing the issue
Most helpful comment
@okorshenko I'll have time to work on it. If you could assign it to me.