public function is_locked() {
        // If the setting is locked or the dependent setting should be locked then return true.
        if ($this->setting->get_status() !== base_setting::NOT_LOCKED ||
                $this->evaluate_disabled_condition($this->setting->get_value())) {
            return true;
        }
        // Else the dependent setting is not locked by this setting_dependency.
        return false;
    }