src/Data/DefaultCollection.php
public function containsById($modelId)
    {
        /** @var ModelInterface $localModel */
        foreach ($this as $localModel) {
            if ($modelId === $localModel->getId()) {
                return true;
            }
        }

        return false;
    }
public function containsById($modelId)
    {
        /** @var ModelInterface $localModel */
        foreach ($this as $localModel) {
            if ($modelId === $localModel->getId()) {
                return true;
            }
        }

        return false;
    }
public function containsById ( $ modelId ) { /** @var ModelInterface $localModel */ foreach ( $ this as $ localModel ) { if ( $ modelId === $ localModel -> getId ( ) ) { return true ; } } return false ; }
Check whether the given model is contained in the collection.

@param mixed $modelId The model id to search.

@return bool
Check whether the given model is contained in the collection .