protected function oneOf($name, $conditions)
    {
        $method = 'get' . ucfirst($name);
        if (method_exists($this, $method)) {
            /** @var \yii\db\ActiveQuery $q */
            $q = call_user_func([$this, $method]);
            $q->andOnCondition($conditions);
            return $q->one();
        }
        throw new InvalidArgumentException(Yii::t('error', 'Method {method} not found.', compact('method')));
    }