src/Model/ModelUtil.php
public function findModelInstancesBy(string $table, $columns, $values, array $options = [])
    {
        /* @var Model $adapter */
        if (!($modelClass = $this->framework->getAdapter(Model::class)->getClassFromTable($table))) {
            return null;
        }

        if (null === ($adapter = $this->framework->getAdapter($modelClass))) {
            return null;
        }

        $this->fixTablePrefixForDcMultilingual($table, $columns, $options);

        if (\is_array($values) && (!isset($options['skipReplaceInsertTags']) || !$options['skipReplaceInsertTags'])) {
            $values = array_map('\Contao\Controller::replaceInsertTags', $values);
        }

        if (empty($columns)) {
            $columns = null;
        }

        return $adapter->findBy($columns, $values, $options);
    }
public function findModelInstancesBy(string $table, $columns, $values, array $options = [])
    {
        /* @var Model $adapter */
        if (!($modelClass = $this->framework->getAdapter(Model::class)->getClassFromTable($table))) {
            return null;
        }

        if (null === ($adapter = $this->framework->getAdapter($modelClass))) {
            return null;
        }

        $this->fixTablePrefixForDcMultilingual($table, $columns, $options);

        if (\is_array($values) && (!isset($options['skipReplaceInsertTags']) || !$options['skipReplaceInsertTags'])) {
            $values = array_map('\Contao\Controller::replaceInsertTags', $values);
        }

        if (empty($columns)) {
            $columns = null;
        }

        return $adapter->findBy($columns, $values, $options);
    }
public function findModelInstancesBy ( string $ table , $ columns , $ values , array $ options = [ ] ) { /* @var Model $adapter */ if ( ! ( $ modelClass = $ this -> framework -> getAdapter ( Model :: class ) -> getClassFromTable ( $ table ) ) ) { return null ; } if ( null === ( $ adapter = $ this -> framework -> getAdapter ( $ modelClass ) ) ) { return null ; } $ this -> fixTablePrefixForDcMultilingual ( $ table , $ columns , $ options ) ; if ( \ is_array ( $ values ) && ( ! isset ( $ options [ 'skipReplaceInsertTags' ] ) || ! $ options [ 'skipReplaceInsertTags' ] ) ) { $ values = array_map ( '\Contao\Controller::replaceInsertTags' , $ values ) ; } if ( empty ( $ columns ) ) { $ columns = null ; } return $ adapter -> findBy ( $ columns , $ values , $ options ) ; }
Returns model instances by given table and search criteria.

@param string $table
@param mixed  $columns
@param mixed  $values
@param array  $options

@return mixed
Returns model instances by given table and search criteria .