src/Model/Behavior/KeyValueBehavior.php
protected function _getFieldToIdMapping(array $keys)
    {
        return $this->_table
            ->find('list', [
                'keyField' => $this->config('fields.key'),
                'valueField' => 'id'
            ])
            ->where([
                'scope' => $this->config('scope'),
                $this->config('fields.key') . ' IN' => $keys
            ])
            ->toArray();
    }
protected function _getFieldToIdMapping(array $keys)
    {
        return $this->_table
            ->find('list', [
                'keyField' => $this->config('fields.key'),
                'valueField' => 'id'
            ])
            ->where([
                'scope' => $this->config('scope'),
                $this->config('fields.key') . ' IN' => $keys
            ])
            ->toArray();
    }
protected function _getFieldToIdMapping ( array $ keys ) { return $ this -> _table -> find ( 'list' , [ 'keyField' => $ this -> config ( 'fields.key' ) , 'valueField' => 'id' ] ) -> where ( [ 'scope' => $ this -> config ( 'scope' ) , $ this -> config ( 'fields.key' ) . ' IN' => $ keys ] ) -> toArray ( ) ; }
Returns an array of existing keys and
their corresponding ids

@param array $keys The keys to map.
@return array
Returns an array of existing keys and their corresponding ids