This law is not about the second amendment, this is about whether or not the state can take the property rights of a business to prohibit behavior under the Takings Clause of the Fifth Amendment. The court should make their decision not on their own personal morals, but using the law and the constitution, guided by stare decisis.
There is a large body case law on this. The Takings Clause of the Fifth Amendment, made applicable to the States through the Fourteenth Amendment, provides that private property shall not be taken for public use without just compensation. The Takings Clause does not prohibit the taking of private property, but instead places a condition on the exercise of that power. It is designed not to limit the governmental interference with property rights per se, but rather to secure compensation in the event of otherwise proper interference amounting to a taking.
The "paradigmatic" taking is a direct government appropriation of private property. In addition to outright appropriation of property, the government may effect a taking through a regulation if it is so onerous that its effect is tantamount to a direct appropriation, this is known as regulatory taking. see Lingle v. Chevron U.S.A., Inc., 544 U.S. 528, (2005).
In Lingle, the Supreme Court provided a framework for addressing regulatory takings. First, a court must determine if the regulation results in one of three types of "per se" regulatory takings. These occur (1) where a regulation requires an owner to suffer a "permanent physical invasion" of the property; or (2) where a regulation completely deprives an owner of "all economically beneficial uses" of the property; or (3) a government demands that a landowner dedicate an easement allowing public access to her property as a condition of obtaining a development permit.
This law does not deprive owners of all economically beneficial uses of their property, but does result in an unwelcome physical invasion onto a business owner's property by individuals transporting and storing firearms in their vehicles. It is apparent the invasion onto Plaintiffs' property is unwelcome because Plaintiffs have corporate policies preventing this. see Loretto v. Teleprompter Manhattan CATV Corporation, 458 U.S. 419(1982)
The Supreme Court first carved out the category of per se physical takings. In Loretto, the Court distinguished temporary physical "invasions" from permanent physical "occupations." The Court made clear that not every limitation on the right to exclude is deserving of per se treatment, notwithstanding the importance of the right to exclude in the bundle of property rights. The court ruled that an invasion is temporary, while an occupation is permanent.
A physical occupation, as defined by the Court, is a permanent and exclusive occupation by the government that destroys the owner's right to possession, use, and disposal of the property. see Boise Cascade Corp. v. United States, 296 F.3d 1339, 1353 (Fed. Cir. 2002)
The laws we are talking about here do not force any permanent "physical structure" on an owner's property. Instead, they force an unwanted physical invasion by third parties engaging in an unwanted activity. The invasion itself is not "permanent" because the individuals engaging in the unwanted activity (guns in cars) do not remain on the property at all times, as would an actual physical structure. Nor does this law cause a "permanent" invasion by the government vis a vis a particular parcel of property, such as the public bike paths at issue in public easement cases. In those cases, even if no person ever chose to ride his bike across a public path, there is nevertheless governmental intrusion because that particular parcel of land is stripped of its right to exclude.
If no individuals choose to engage in the activity of transporting firearms in vehicles, landowners will not suffer unwanted invasions. It is therefore hard to classify the invasion caused by this law as "permanent" for purposes of a takings analysis.
See Pruneyard Shopping Center v. Robins, 447 U.S. 74, 1980) (analyzing California constitutional provision permitting individuals to exercise free speech rights on private property against the wishes of the private property owner under a balancing test); Cienega Gardens, 331 F.3d at 1337-38 (applying Penn Central test to regulation that forced landlords to allow a "physical invasion" of their buildings by certain unwanted tenants); Boise Cascade, 296 F.3d at 1357 (holding that government official's periodic intrusion onto private property for purpose of conducting owl surveys over a period of five months was not a per se taking and must be analyzed under Penn Central test).