Throughout this paper, all groups are finite. Let $\sigma=\{\sigma_i\mid i\in I\}$ be some partition of the set of all primes $\mathbb{P}$. The natural numbers $n$ and $m$ are called $\sigma$-coprime if for every $\sigma_i$ such that $\sigma_i\cap\pi(n)\ne\varnothing$ we have $\sigma_i\cap\pi(m)=\varnothing$. Let $t>1$ be a natural
number and let $\mathfrak{F}$ be a class of groups. Then we say that $\mathfrak{F}$ is: (i) $S_\sigma^t$-closed (respectively weakly $S_\sigma^t$-closed) provided $\mathfrak{F}$ contains each finite group $G$ which satisfies the following conditions: (1) $G$ has subgroups $A_1,\dots,A_t\in\mathfrak{F}$ such that $G=A_iA_j$ for all $i\ne j$; (2) The indices $|G:N_G(A_1)|,\dots,|G:N_G(A_t)|$ (respectively the indices $|G:A_1|,\dots,|G:A_{t-1}|, |G:N_G(A_t)|$) are pairwise
$\sigma$-coprime; (ii) $\mathcal{M}_\sigma^t$-closed (respectively weakly $\mathcal{M}_\sigma^t$-closed) provided $\mathfrak{F}$ contains each finite group $G$ which satisfies
the following conditions: (1) $G$ has modular subgroups $A_1,\dots,A_t\in\mathfrak{F}$ such that $G=A_iA_j$ for all $i\ne j$; (2) The indices $|G:N_G(A_1)|,\dots,|G:N_G(A_t)|$ (respectively the indices $|G:A_1|,\dots,|G:A_{t-1}|, |G:N_G(A_t)|$) are pairwise
$\sigma$-coprime. In this paper,
we study properties and applications of (weakly) $S_\sigma^t$-closed and (weakly) $\mathcal{M}_\sigma^t$-closed classes of finite groups.