protected function _extractForeignKey($entity)
    {
        $foreignKey = (array)$this->_config['foreignKey'];
        $primaryKey = (array)$this->_table->getPrimaryKey();
        $pkValue = $entity->extract($primaryKey);

        return array_combine($foreignKey, $pkValue);
    }
protected function _extractForeignKey($entity)
    {
        $foreignKey = (array)$this->_config['foreignKey'];
        $primaryKey = (array)$this->_table->getPrimaryKey();
        $pkValue = $entity->extract($primaryKey);

        return array_combine($foreignKey, $pkValue);
    }
protected function _extractForeignKey ( $ entity ) { $ foreignKey = ( array ) $ this -> _config [ 'foreignKey' ] ; $ primaryKey = ( array ) $ this -> _table -> getPrimaryKey ( ) ; $ pkValue = $ entity -> extract ( $ primaryKey ) ; return array_combine ( $ foreignKey , $ pkValue ) ; }
Returns an array with foreignKey value.

@param \Cake\Datasource\EntityInterface $entity Entity.
@return array
Returns an array with foreignKey value .