Model/ResourceModel/Importer/Collection.php
public function getQueueByTypeAndMode($importType, $importMode, $limit)
    {
        if (is_array($importType)) {
            $condition = [];
            foreach ($importType as $type) {
                if ($type == 'Catalog') {
                    $condition[] = ['like' => $type . '%'];
                } else {
                    $condition[] = ['eq' => $type];
                }
            }
            $this->addFieldToFilter('import_type', $condition);
        } else {
            $this->addFieldToFilter(
                'import_type',
                ['eq' => $importType]
            );
        }

        $this->addFieldToFilter('import_mode', ['eq' => $importMode])
            ->addFieldToFilter(
                'import_status',
                ['eq' => \Dotdigitalgroup\Email\Model\Importer::NOT_IMPORTED]
            )
            ->setPageSize($limit)
            ->setCurPage(1);

        return $this;
    }
public function getQueueByTypeAndMode($importType, $importMode, $limit)
    {
        if (is_array($importType)) {
            $condition = [];
            foreach ($importType as $type) {
                if ($type == 'Catalog') {
                    $condition[] = ['like' => $type . '%'];
                } else {
                    $condition[] = ['eq' => $type];
                }
            }
            $this->addFieldToFilter('import_type', $condition);
        } else {
            $this->addFieldToFilter(
                'import_type',
                ['eq' => $importType]
            );
        }

        $this->addFieldToFilter('import_mode', ['eq' => $importMode])
            ->addFieldToFilter(
                'import_status',
                ['eq' => \Dotdigitalgroup\Email\Model\Importer::NOT_IMPORTED]
            )
            ->setPageSize($limit)
            ->setCurPage(1);

        return $this;
    }
public function getQueueByTypeAndMode ( $ importType , $ importMode , $ limit ) { if ( is_array ( $ importType ) ) { $ condition = [ ] ; foreach ( $ importType as $ type ) { if ( $ type == 'Catalog' ) { $ condition [ ] = [ 'like' => $ type . '%' ] ; } else { $ condition [ ] = [ 'eq' => $ type ] ; } } $ this -> addFieldToFilter ( 'import_type' , $ condition ) ; } else { $ this -> addFieldToFilter ( 'import_type' , [ 'eq' => $ importType ] ) ; } $ this -> addFieldToFilter ( 'import_mode' , [ 'eq' => $ importMode ] ) -> addFieldToFilter ( 'import_status' , [ 'eq' => \ Dotdigitalgroup \ Email \ Model \ Importer :: NOT_IMPORTED ] ) -> setPageSize ( $ limit ) -> setCurPage ( 1 ) ; return $ this ; }
Get the imports by type and mode.

@param string $importType
@param string $importMode
@param int $limit

@return $this
Get the imports by type and mode .