public function set($key, $value)
	{
		if ( ! $value instanceof Toggle)
		{
			throw new \InvalidArgumentException('You can only add Toggle objects to a ToggleGroup.');
		}

		return parent::set($key, $value);
	}
public function set($key, $value)
	{
		if ( ! $value instanceof Toggle)
		{
			throw new \InvalidArgumentException('You can only add Toggle objects to a ToggleGroup.');
		}

		return parent::set($key, $value);
	}
public function set ( $ key , $ value ) { if ( ! $ value instanceof Toggle ) { throw new \ InvalidArgumentException ( 'You can only add Toggle objects to a ToggleGroup.' ) ; } return parent :: set ( $ key , $ value ) ; }
Extends DataContainer's set method to ensure only Toggle objects can be added.

@param string $key
@param mixed  $value

@return $this

@throws \InvalidArgumentException

@since 2.0
Extends DataContainer s set method to ensure only Toggle objects can be added .