Classes/Scheduler/Provider/AbstractProvider.php
protected function getSiteOptions( array $siteItems, array $selected, $level )
	{
		$html = '';
		$prefix = str_repeat( '-', $level ) . ' ';

		foreach( $siteItems as $item )
		{
			$active = ( in_array( $item->getCode(), $selected ) ? 'selected="selected"' : '' );
			$disabled = ( $item->getStatus() > 0 ? '' : 'disabled="disabled"' );
			$string = '<option value="%1$s" %2$s %3$s>%4$s</option>';
			$html .= sprintf( $string, $item->getCode(), $active, $disabled, $prefix . $item->getLabel() );

			$html .= $this->getSiteOptions( $item->getChildren(), $selected, $level+1 );
		}

		return $html;
	}
protected function getSiteOptions( array $siteItems, array $selected, $level )
	{
		$html = '';
		$prefix = str_repeat( '-', $level ) . ' ';

		foreach( $siteItems as $item )
		{
			$active = ( in_array( $item->getCode(), $selected ) ? 'selected="selected"' : '' );
			$disabled = ( $item->getStatus() > 0 ? '' : 'disabled="disabled"' );
			$string = '<option value="%1$s" %2$s %3$s>%4$s</option>';
			$html .= sprintf( $string, $item->getCode(), $active, $disabled, $prefix . $item->getLabel() );

			$html .= $this->getSiteOptions( $item->getChildren(), $selected, $level+1 );
		}

		return $html;
	}
protected function getSiteOptions ( array $ siteItems , array $ selected , $ level ) { $ html = '' ; $ prefix = str_repeat ( '-' , $ level ) . ' ' ; foreach ( $ siteItems as $ item ) { $ active = ( in_array ( $ item -> getCode ( ) , $ selected ) ? 'selected="selected"' : '' ) ; $ disabled = ( $ item -> getStatus ( ) > 0 ? '' : 'disabled="disabled"' ) ; $ string = '<option value="%1$s" %2$s %3$s>%4$s</option>' ; $ html .= sprintf ( $ string , $ item -> getCode ( ) , $ active , $ disabled , $ prefix . $ item -> getLabel ( ) ) ; $ html .= $ this -> getSiteOptions ( $ item -> getChildren ( ) , $ selected , $ level + 1 ) ; } return $ html ; }
Returns the HTML code for the select control.
The method adds every site and its children recursively.

@param array $siteItems List of items implementing \Aimeos\MShop\Locale\Item\Site\Iface
@param array $selected List of site codes that were previously selected by the user
@param integer $level Nesting level of the sites (should start with 0)
@return string HTML code with <option> tags for the select box
Returns the HTML code for the select control . The method adds every site and its children recursively .