PHP Class Smile\ElasticsuiteTracker\Block\Variables\Page\Base

Author: Romain Ruaud ([email protected])
Inheritance: extends AbstractBlock
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( Magento\Framework\View\Element\Template\Context $context, Magento\Framework\Json\Helper\Data $jsonHelper, Data $trackerHelper, Magento\Framework\Registry $registry, Magento\Framework\View\Layout\PageType\Config $pageTypeConfig, array $data = [] ) Set the default template for page variable blocks
getPageTypeIdentifier ( ) : string Page type identifier built from route (ex: catalog/product/view => catalog_product_view)
getPageTypeInformations ( ) : array List of the page type data
getPageTypeLabel ( ) : string Human readable version of the page
getVariables ( ) : array Append the page type data to the tracked variables list

Private Methods

Method Description
getPageTypeLabelMap ( ) : array Return the array of page labels from layout indexed by handle names.

Method Details

__construct() public method

Set the default template for page variable blocks
public __construct ( Magento\Framework\View\Element\Template\Context $context, Magento\Framework\Json\Helper\Data $jsonHelper, Data $trackerHelper, Magento\Framework\Registry $registry, Magento\Framework\View\Layout\PageType\Config $pageTypeConfig, array $data = [] )
$context Magento\Framework\View\Element\Template\Context The template context
$jsonHelper Magento\Framework\Json\Helper\Data The Magento's JSON Helper
$trackerHelper Smile\ElasticsuiteTracker\Helper\Data The Smile Tracker helper
$registry Magento\Framework\Registry Magento Core Registry
$pageTypeConfig Magento\Framework\View\Layout\PageType\Config The page type configuration
$data array The block data

getPageTypeIdentifier() public method

Page type identifier built from route (ex: catalog/product/view => catalog_product_view)
public getPageTypeIdentifier ( ) : string
return string

getPageTypeInformations() public method

List of the page type data
public getPageTypeInformations ( ) : array
return array

getPageTypeLabel() public method

Human readable version of the page
public getPageTypeLabel ( ) : string
return string

getVariables() public method

Append the page type data to the tracked variables list
public getVariables ( ) : array
return array