I just thought to KISS could just replace this with:

		$viewOptions = get_object_vars($this);
		$viewOptions = $viewOptions ? $viewOptions : [];