private function _getRestriction($data, $secodaryKey, $allowGlobal = true)
    {
        $restriction = [];

        if ($data) {
            $restriction[$secodaryKey] = $this->_getSecondaryKeys($data, $this->viaModel->formName());
        }

        if ($allowGlobal && $this->restriction) {
            $restriction = ArrayHelper::merge($restriction, $this->restriction);
        }

        return $restriction;
    }