private function deleteOneToManyRelations(\Tx_Oelib_Model $model)
    {
        $data = $model->getData();

        foreach ($this->relations as $key => $mapperName) {
            if ($this->isOneToManyRelationConfigured($key)) {
                $relatedModels = $data[$key];
                if (!is_object($relatedModels)) {
                    continue;
                }

                $mapper = \Tx_Oelib_MapperRegistry::get($mapperName);
                /** @var \Tx_Oelib_Model $relatedModel */
                foreach ($relatedModels as $relatedModel) {
                    $mapper->delete($relatedModel);
                }
            }
        }
    }
private function deleteOneToManyRelations(\Tx_Oelib_Model $model)
    {
        $data = $model->getData();

        foreach ($this->relations as $key => $mapperName) {
            if ($this->isOneToManyRelationConfigured($key)) {
                $relatedModels = $data[$key];
                if (!is_object($relatedModels)) {
                    continue;
                }

                $mapper = \Tx_Oelib_MapperRegistry::get($mapperName);
                /** @var \Tx_Oelib_Model $relatedModel */
                foreach ($relatedModels as $relatedModel) {
                    $mapper->delete($relatedModel);
                }
            }
        }
    }
private function deleteOneToManyRelations ( \ Tx_Oelib_Model $ model ) { $ data = $ model -> getData ( ) ; foreach ( $ this -> relations as $ key => $ mapperName ) { if ( $ this -> isOneToManyRelationConfigured ( $ key ) ) { $ relatedModels = $ data [ $ key ] ; if ( ! is_object ( $ relatedModels ) ) { continue ; } $ mapper = \ Tx_Oelib_MapperRegistry :: get ( $ mapperName ) ; /** @var \Tx_Oelib_Model $relatedModel */ foreach ( $ relatedModels as $ relatedModel ) { $ mapper -> delete ( $ relatedModel ) ; } } } }
Deletes all one-to-many related models of this model.

@param \Tx_Oelib_Model $model
the model for which to delete the related models

@return void
Deletes all one - to - many related models of this model .