public static function findOnesAllRelations($user, $groups = null)
    {
        return static::find()->initiators($user)->groups($groups)->all();
    }
public static function findOnesAllRelations($user, $groups = null)
    {
        return static::find()->initiators($user)->groups($groups)->all();
    }
public static function findOnesAllRelations ( $ user , $ groups = null ) { return static :: find ( ) -> initiators ( $ user ) -> groups ( $ groups ) -> all ( ) ; }
Get user's or users' all relations, or by specified groups.
@param BaseUserModel|string|array $user Initiator or its GUID, or Initiators or their GUIDs.
@param BaseUserRelationGroupModel|string|array|null $groups UserRelationGroup
or its guid, or array of them. If you do not want to delimit the groups, please assign null.
@return array all eligible relations
Get user s or users all relations or by specified groups .