src/View/Helper/TagHelper.php
public function control(array $options = []) {
		if ($this->getConfig('strategy') === 'array') {
			$tags = (array)$this->Form->getSourceValue($this->getConfig('field'));

			$options += [
				'options' => array_combine($tags, $tags),
				'val' => $tags,
				'type' => 'select',
				'multiple' => true,
			];
		}

		$options += [
			'label' => __d('tags', 'Tags'),
		];

		return $this->Form->control($this->getConfig('field'), $options);
	}
public function control(array $options = []) {
		if ($this->getConfig('strategy') === 'array') {
			$tags = (array)$this->Form->getSourceValue($this->getConfig('field'));

			$options += [
				'options' => array_combine($tags, $tags),
				'val' => $tags,
				'type' => 'select',
				'multiple' => true,
			];
		}

		$options += [
			'label' => __d('tags', 'Tags'),
		];

		return $this->Form->control($this->getConfig('field'), $options);
	}
public function control ( array $ options = [ ] ) { if ( $ this -> getConfig ( 'strategy' ) === 'array' ) { $ tags = ( array ) $ this -> Form -> getSourceValue ( $ this -> getConfig ( 'field' ) ) ; $ options += [ 'options' => array_combine ( $ tags , $ tags ) , 'val' => $ tags , 'type' => 'select' , 'multiple' => true , ] ; } $ options += [ 'label' => __d ( 'tags' , 'Tags' ) , ] ; return $ this -> Form -> control ( $ this -> getConfig ( 'field' ) , $ options ) ; }
Convenience method for tag list form input.

@param array $options

@return string
Convenience method for tag list form input .