Anonymous
public text v1 · immutable static public function countControls($control, $currentCount=0)
{
$controls=$control->getControls();
if ($controls->getCount() > 0)
{
for ($i=0; $i < $controls->getCount(); $i++)
{
$currentCount++;
$currControl=$controls->itemAt($i);
$currentCount+=(($currControl instanceof TControl) ? self::countControls($currControl, $currentCount) : 1);
}
return $currentCount;
}
else
{
return $currentCount;
}
}