public function getCmsReferenceKeyForRelation($relation, $reversed = false)
    {
        $isParent = (   array_key_exists($relation, $this->relationsConfig)
                    &&  array_key_exists('parent', $this->relationsConfig[$relation])
                    &&  (bool) $this->relationsConfig[$relation]['parent']
                    );

        if ($reversed) {
            $isParent = ! $isParent;
        }

        return $isParent
                ?   config('pxlcms.relations.references.keys.to', 'to_entry_id')
                :   config('pxlcms.relations.references.keys.from', 'from_entry_id');
    }