Cake\ORM\Association\BelongsToMany::_linkField PHP Method

_linkField() protected method

Generates a string used as a table field that contains the values upon which the filter should be applied
protected _linkField ( array $options ) : string
$options array the options to use for getting the link field.
return string
    protected function _linkField($options)
    {
        $links = [];
        $name = $this->_junctionAssociationName();
        foreach ((array) $options['foreignKey'] as $key) {
            $links[] = sprintf('%s.%s', $name, $key);
        }
        if (count($links) === 1) {
            return $links[0];
        }
        return $links;
    }