/**
* Inserts an item at the specified position.
* This method overrides the parent implementation by checking if
* the item being added is a {@link TWizardStep}.
* @param integer the speicified position.
* @param mixed new item
* @throws TInvalidDataTypeException if the item being added is not TWizardStep.
*/
public function insertAt($index, $item)
{
if ($item instanceof TWizardStep) {
parent::insertAt($index, $item);
$this->_wizard->getMultiView()->getViews()->insertAt($index, $item);
$this->_wizard->addedWizardStep($item);
} else {
throw new TInvalidDataTypeException('wizardstepcollection_wizardstep_required');
}
}