Selects one or more options in a Chosen Multiple Select based on its label

@param   string  $label    Label of the select field
@param   array   $options  Array of options to be selected

@return  void

@since   3.0.0
974102
public function selectMultipleOptionsInChosen($label, $options)
	{
		$select = $this->findField($label);
		$selectID = $select->getAttribute('id');
		$chosenSelectID = $selectID . '_chzn';

		foreach ($options as $option)
		{
			$this->debug("I open the $label chosen selector");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']/ul"));
			$this->debug("I select $option");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']//li[contains(text()[normalize-space()], '$option')]"));

			// Gives time to chosen to close
			$this->wait(1);
		}
	}
485272
public function setLabel($label) {
        if (!is_string($label)) throw new IllegalTypeException('Illegal type of parameter $label: '.gettype($label));
        if (!strlen($label))    throw new InvalidArgumentException('Invalid argument $label: '.$label);

        $this->label = $label;
        return $this;
    }
385927
public function setLabel($label)
    {
        if (!(is_scalar($label) || is_null($label))) {
            return false;
        }

        $this->label = $label;
    }
879874
public function setOptions(array $options)
    {
        foreach ($options as $option => $value) {
            $methodName = 'set'.ucfirst($option);
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
358607
public function addSelect($name, $label, $multi = [],  $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Select($name, $label, $multi);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
1264252
public static function splitButtonDropdown($label, $items, $htmlOptions = array())
    {
        $htmlOptions['split'] = true;
        return self::buttonDropdown($label, $items, $htmlOptions);
    }
621842
public function set_options($name,$options){
		if (is_array($options)){
			$str="";
			foreach($options as $k => $v)
				$str.="<item value='".$this->xmlentities($k)."' label='".$this->xmlentities($v)."' />";
			$options=$str;
		}
		$this->options[$name]=$options;
	}
710716
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->setOption($name, $value);
        }
    }
985934
protected function renderLabelParts ($label = null, $options = [])
		{
			parent::renderLabelParts($label, $options);
			if (!empty($this->parts[ '{labelTitle}' ]))
				$this->parts[ '{labelTitle}' ] = Yii::tr($this->parts[ '{labelTitle}' ]);
		}
878842
public function addGroup($label)
    {
        $objGroup = new SelectGroup($label);
        $objGroup->setMeta("parent", $this, true);

        $this->__options->addObject($objGroup);

        return $objGroup;
    }
9354
public static function select( $items, $options = [] ) {
		$options['tag'] = 'select';
		$options['item'] = function ( $item, $index ) {
			$itemOptions = [];
			if ( is_array( $item ) ) {
				$label = $item['label'];
                $itemOptions['value'] = $item['value'];
				if ( ! empty( $item['options'] ) && ArrayHelper::isAssociative( $item['options'] ) ) {
                    $itemOptions = array_merge( $itemOptions, $item['options'] );
                }
			} else {
				$label = $item;
				$itemOptions['value'] = $item;
			}

			return static::tag('option', $label, $itemOptions );
		};

		return static::ul( $items, $options );
	}
832077
protected function addElement_select ($name, $label, $customElementConfig=array())
    {
        $defaultElementConfig = array(
            'name'       => $name,
            'attributes' => array(
                'id'         => $name,
            ),
            'options'    => array(
                'label'      => $label,
            ),
        );
        $elementConfig = array_replace_recursive(
            $defaultElementConfig,
            $customElementConfig
        );

        $this->addElement_select_configArray($elementConfig);
    }
512766
public function table($Label, $Table, $Options = array())
    {
        return $this->fb($Table, $Label, FirePHP::TABLE, $Options);
    }
993049
public function addButton($label, $options = array())
    {
        $position = 'after';
        if (is_string($options)) {
            $position = $options;
        } else {
            if (isset($options['position'])) {
                $position = $options['position'];
            }
        }
        if ($position == 'after') {
            /** @type Button $button */
            $button = $this->afterField()->add('Button', $options);
            $button->set($label);
        } else {
            /** @type Button $button */
            $button = $this->beforeField()->add('Button', $options);
            $button->set($label);
        }
        $this->js('change', $button->js()->data('val', $this->js()->val()));

        return $button;
    }
287959
protected function optionGroup($list, $label, $selected, array $attributes = [], array $optionsAttributes = [], $level = 0)
    {
        $html = [];
        $space = str_repeat("&nbsp;", $level);
        foreach ($list as $value => $display) {
            $optionAttributes = $optionsAttributes[$value] ?? [];
            if (is_iterable($display)) {
                $html[] = $this->optionGroup($display, $value, $selected, $attributes, $optionAttributes, $level+5);
            } else {
                $html[] = $this->option($space.$display, $value, $selected, $optionAttributes);
            }
        }
        return $this->toHtmlString('<optgroup label="' . e($space.$label, false) . '"' . $this->html->attributes($attributes) . '>' . implode('', $html) . '</optgroup>');
    }
373343
public void selectByLabel(String label) {
        getDispatcher().beforeSelect(this, label);
        
        new Select(getElement()).selectByVisibleText(label);
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIActions(UIActions.SELECTED, label);
        }
        
        getDispatcher().afterSelect(this, label);
    }
814687
public function setLabel($label) {
		if (is_array($label) && empty($label)) {
			$this->label = new \stdClass;
		} else {
			$this->label = $label;
		}

		return $this;
	}