code/forms/FoundationSwitchField.php
public function getSource() {
		if (is_array($this->source)) {
			if (count($this->source) != 2) {
				user_error('FoundationSwitchField::getSource(): accepts only 2 options', E_USER_ERROR);
			}
			return array_slice($this->source, 0, 2);
		}
	}
public function getSource() {
		if (is_array($this->source)) {
			if (count($this->source) != 2) {
				user_error('FoundationSwitchField::getSource(): accepts only 2 options', E_USER_ERROR);
			}
			return array_slice($this->source, 0, 2);
		}
	}
public function getSource ( ) { if ( is_array ( $ this -> source ) ) { if ( count ( $ this -> source ) != 2 ) { user_error ( 'FoundationSwitchField::getSource(): accepts only 2 options' , E_USER_ERROR ) ; } return array_slice ( $ this -> source , 0 , 2 ) ; } }
Gets the first two items from source array, since SwitchField only works with two values.

@return array
Gets the first two items from source array since SwitchField only works with two values .