PHP Class Smile\ElasticsuiteCore\Block\Adminhtml\Search\Request\RelevanceConfig\Form

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

Public Methods

Method Description
__construct ( Magento\Backend\Block\Template\Context $context, Magento\Framework\Registry $registry, Magento\Framework\Data\FormFactory $formFactory, Magento\Config\Model\Config\Factory $configFactory, Magento\Config\Model\Config\Structure $configStructure, Magento\Config\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory, Magento\Config\Block\System\Config\Form\Field\Factory $fieldFactory, array $data = [] ) Form constructor.
canUseContainerValue ( integer $fieldValue ) : boolean Check if can use website value
canUseDefaultValue ( integer $fieldValue ) : boolean Check if can use default value
getConfigValue ( string $path ) : mixed Get config value
getContainerCode ( ) : string Retrieve container code
getScope ( ) : string Retrieve current scope
getScopeCode ( ) : string Get current scope code
getScopeLabel ( Magento\Config\Model\Config\Structure\Element\Field $field ) : string Retrieve label for scope

Protected Methods

Method Description
_initElement ( Magento\Config\Model\Config\Structure\Element\Field $field, Magento\Framework\Data\Form\Element\Fieldset $fieldset, string $path, string $fieldPrefix = '', string $labelPrefix = '' ) Init form element from config.
_initObjects ( ) Initialize objects required to render config form

Method Details

__construct() public method

Form constructor.
public __construct ( Magento\Backend\Block\Template\Context $context, Magento\Framework\Registry $registry, Magento\Framework\Data\FormFactory $formFactory, Magento\Config\Model\Config\Factory $configFactory, Magento\Config\Model\Config\Structure $configStructure, Magento\Config\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory, Magento\Config\Block\System\Config\Form\Field\Factory $fieldFactory, array $data = [] )
$context Magento\Backend\Block\Template\Context Application Context
$registry Magento\Framework\Registry Magento Registry
$formFactory Magento\Framework\Data\FormFactory Form Factory
$configFactory Magento\Config\Model\Config\Factory Configuration Factory
$configStructure Magento\Config\Model\Config\Structure Configuration Structure
$fieldsetFactory Magento\Config\Block\System\Config\Form\Fieldset\Factory Fieldset Factory
$fieldFactory Magento\Config\Block\System\Config\Form\Field\Factory Field Factory
$data array Object Data

_initElement() protected method

Init form element from config.
protected _initElement ( Magento\Config\Model\Config\Structure\Element\Field $field, Magento\Framework\Data\Form\Element\Fieldset $fieldset, string $path, string $fieldPrefix = '', string $labelPrefix = '' )
$field Magento\Config\Model\Config\Structure\Element\Field Form field.
$fieldset Magento\Framework\Data\Form\Element\Fieldset Form fieldset.
$path string Config path.
$fieldPrefix string Field name prefix.
$labelPrefix string Field label prefix.

_initObjects() protected method

Initialize objects required to render config form
protected _initObjects ( )

canUseContainerValue() public method

Check if can use website value
public canUseContainerValue ( integer $fieldValue ) : boolean
$fieldValue integer The field value
return boolean

canUseDefaultValue() public method

Check if can use default value
public canUseDefaultValue ( integer $fieldValue ) : boolean
$fieldValue integer The field value
return boolean

getConfigValue() public method

Get config value
public getConfigValue ( string $path ) : mixed
$path string The config value path
return mixed

getContainerCode() public method

Retrieve container code
public getContainerCode ( ) : string
return string

getScope() public method

Retrieve current scope
public getScope ( ) : string
return string

getScopeCode() public method

Get current scope code
public getScopeCode ( ) : string
return string

getScopeLabel() public method

Retrieve label for scope
public getScopeLabel ( Magento\Config\Model\Config\Structure\Element\Field $field ) : string
$field Magento\Config\Model\Config\Structure\Element\Field The field
return string