Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MultiSelect.php
Go to the documentation of this file.
1 <?php
7 
13 {
14  const NAME = 'multiselect';
15 
16  const DEFAULT_SIZE = 6;
17 
21  public function prepare()
22  {
23  $config['size'] = self::DEFAULT_SIZE;
24  $this->setData('config', array_replace_recursive((array)$this->getData('config'), $config));
25  parent::prepare();
26  }
27 
32  public function getComponentName()
33  {
34  return static::NAME;
35  }
36 
41  public function getIsSelected($optionValue)
42  {
43  return in_array($optionValue, (array) $this->getValue());
44  }
45 }
$config
Definition: fraud_order.php:17