src/Data/DefaultCollection.php
public function removeById($modelId)
    {
        foreach ($this->arrCollection as $index => $model) {
            if ($modelId === $model->getId()) {
                unset($this->arrCollection[$index]);
            }
        }
    }
public function removeById($modelId)
    {
        foreach ($this->arrCollection as $index => $model) {
            if ($modelId === $model->getId()) {
                unset($this->arrCollection[$index]);
            }
        }
    }
public function removeById ( $ modelId ) { foreach ( $ this -> arrCollection as $ index => $ model ) { if ( $ modelId === $ model -> getId ( ) ) { unset ( $ this -> arrCollection [ $ index ] ) ; } } }
Remove the model with the given id from the collection.

@param mixed $modelId The id of the model to remove.

@return void
Remove the model with the given id from the collection .