All pastes #418035 Raw Edit

Stuff

public text v1 · immutable
#418035 ·published 2007-03-31 11:25 UTC
rendered paste body
	static public function countControls($control, $currentCount=0)
	{
		$controls=$control->getControls();
		if (($count=$controls->getCount()) > 0)
		{
			for ($i=0; $i < $count; $i++)
			{
				if (($currControl=$controls->itemAt($i)) instanceof TControl)
				{
					$currentCount++;
					$currentCount=self::countControls($currControl, $currentCount);
				}
			}
		}
		
		return $currentCount;
		
	}