PHP Class Smile\ElasticsuiteCore\Block\Adminhtml\Search\Request\RelevanceConfig\Scope\Switcher

Author: Romain Ruaud ([email protected])
Inheritance: extends Magento\Backend\Block\Template
Show file Open project: smile-sa/elasticsuite

Protected Properties

Property Type Description
$containersSource Smile\ElasticsuiteCore\Model\Search\Request\Source\Containers
$defaultContainerVar string Name of container variable
$defaultStoreVarName string Name of store variable
$hasDefaultOption boolean
$storeFactory Magento\Store\Model\StoreFactory Store Factory
$storeIds array

Public Methods

Method Description
__construct ( Magento\Backend\Block\Template\Context $context, Magento\Store\Model\StoreFactory $storeFactory, Containers $containersSource, array $data = [] ) Class constructor
getContainerCode ( ) : string | null Retrieve container code
getContainerLabel ( array $container ) : mixed Get container name
getContainerName ( array $container ) : mixed Get container name
getContainerVarName ( ) : string Retrieve container var name
getContainers ( ) : array Get containers
getCurrentContainerLabel ( ) : string Get current container name
getCurrentContainerName ( ) : string Get current container name
getCurrentSelectionName ( ) : string Get current selection name
getCurrentStoreName ( ) : string Get current store view name
getStoreId ( ) : integer | null Retrieve Store Id
getStoreVarName ( ) : mixed | string Retrieve store var name
getStores ( ) : Magento\Store\Model\Store[] Get store views
getSwitchUrl ( ) : string Retrieve switch url
hasDefaultOption ( boolean $hasDefaultOption = null ) : boolean Set/Get whether the switcher should show default option
hasScopeSelected ( ) : boolean
isContainerSelected ( array $container ) : boolean Check if container is selected
isContainerSwitchEnabled ( ) : boolean Check if can switch to containers
isFullText ( array $container ) : boolean Check if container is used for fulltext queries
isStoreSelected ( Magento\Store\Model\Store $store ) : boolean
isStoreSwitchEnabled ( ) : boolean Check if can switch to store views
setContainerVarName ( string $varName )
setStoreVarName ( string $varName )

Protected Methods

Method Description
_construct ( ) : void Internal constructor

Method Details

__construct() public method

Class constructor
public __construct ( Magento\Backend\Block\Template\Context $context, Magento\Store\Model\StoreFactory $storeFactory, Containers $containersSource, array $data = [] )
$context Magento\Backend\Block\Template\Context Application context
$storeFactory Magento\Store\Model\StoreFactory Store factory
$containersSource Smile\ElasticsuiteCore\Model\Search\Request\Source\Containers The Containers source model
$data array The data

_construct() protected method

Internal constructor
protected _construct ( ) : void
return void

getContainerCode() public method

Retrieve container code
public getContainerCode ( ) : string | null
return string | null

getContainerLabel() public method

Get container name
public getContainerLabel ( array $container ) : mixed
$container array The container name
return mixed

getContainerName() public method

Get container name
public getContainerName ( array $container ) : mixed
$container array The container name
return mixed

getContainerVarName() public method

Retrieve container var name
public getContainerVarName ( ) : string
return string

getContainers() public method

Get containers
public getContainers ( ) : array
return array

getCurrentContainerLabel() public method

Get current container name
public getCurrentContainerLabel ( ) : string
return string

getCurrentContainerName() public method

Get current container name
public getCurrentContainerName ( ) : string
return string

getCurrentSelectionName() public method

Get current selection name
public getCurrentSelectionName ( ) : string
return string

getCurrentStoreName() public method

Get current store view name
public getCurrentStoreName ( ) : string
return string

getStoreId() public method

Retrieve Store Id
public getStoreId ( ) : integer | null
return integer | null

getStoreVarName() public method

Retrieve store var name
public getStoreVarName ( ) : mixed | string
return mixed | string

getStores() public method

Get store views
public getStores ( ) : Magento\Store\Model\Store[]
return Magento\Store\Model\Store[]

getSwitchUrl() public method

Retrieve switch url
public getSwitchUrl ( ) : string
return string

hasDefaultOption() public method

Set/Get whether the switcher should show default option
public hasDefaultOption ( boolean $hasDefaultOption = null ) : boolean
$hasDefaultOption boolean If witcher has default option
return boolean

hasScopeSelected() public method

public hasScopeSelected ( ) : boolean
return boolean

isContainerSelected() public method

Check if container is selected
public isContainerSelected ( array $container ) : boolean
$container array The container
return boolean

isContainerSwitchEnabled() public method

Check if can switch to containers

isFullText() public method

Check if container is used for fulltext queries
public isFullText ( array $container ) : boolean
$container array The container name
return boolean

isStoreSelected() public method

public isStoreSelected ( Magento\Store\Model\Store $store ) : boolean
$store Magento\Store\Model\Store The store
return boolean

isStoreSwitchEnabled() public method

Check if can switch to store views
public isStoreSwitchEnabled ( ) : boolean
return boolean

setContainerVarName() public method

public setContainerVarName ( string $varName )
$varName string The var name

setStoreVarName() public method

public setStoreVarName ( string $varName )
$varName string The var name

Property Details

$containersSource protected property

protected Containers,Smile\ElasticsuiteCore\Model\Search\Request\Source $containersSource
return Smile\ElasticsuiteCore\Model\Search\Request\Source\Containers

$defaultContainerVar protected property

Name of container variable
protected string $defaultContainerVar
return string

$defaultStoreVarName protected property

Name of store variable
protected string $defaultStoreVarName
return string

$hasDefaultOption protected property

protected bool $hasDefaultOption
return boolean

$storeFactory protected property

Store Factory
protected StoreFactory,Magento\Store\Model $storeFactory
return Magento\Store\Model\StoreFactory

$storeIds protected property

protected array $storeIds
return array