After the Magento 2.2 version, Magento introduces the ViewModel concept, which is looking quite cool and awesome because sometimes you need some custom value of
To create a custom Js component we need to create the below file as per folder structure. first, we create our test-component.js(view/web/js/test-component.js) file, define([ ‘jquery’,
For that, you can use Magento\Cms\Api\GetBlockByIdentifierInterface. No need to use Magento\Framework\Api\SearchCriteriaBuilder. /** * @var \Magento\Cms\Api\GetBlockByIdentifierInterface */ private $blockByIdentifier; public function __construct( GetBlockByIdentifierInterface $blockIdentifier ) {
For that, you can use Magento\Cms\Api\GetPageByIdentifierInterface. No need to use Magento\Framework\Api\SearchCriteriaBuilder. use Magento\Cms\Api\GetPageByIdentifierInterface. /** * @var \Magento\Cms\Api\GetPageByIdentifierInterface */ private $pageByIdentifier; public function __construct( GetPageByIdentifierInterface $pageByIdentifierInterface
Custom routers provide a way to modify/replace existing route names with custom ones. For example, if you want to change the current route name learning