How does the environment influence the aircraft engine demanded thrust?
All modern engine control systems take 'environment' (most importantly inlet total pressure and temperature) into account.

Takeoff and maximum continuous thrust are normally limited by the turbine temperature (which is controlled internally) and N2 (high-pressure rotor) RPM. So such settings on the throttle usually preset a certain N2, and then the thrust will be whatever the engine develops in present conditions. However, this limiting N2 may, and often does, depend on the environmental conditions. The max max (takeoff) is usually a hard limit, but the max cruise N2 may increase with altitude (falling temperature/pressure). Thus when you are climbing with a constant throttle setting, the control system may increase the RPM - even though the actual thrust will be falling due to engine physics.

Idle thrust is limited by stability of the flame. Idle RPM on the ground may be substantially lower than what can be sustained in the air (at speed). Thus the engine control systems often have a weight-on-wheels input signal and apply different control on the ground, primarily with regards to idle power.

Idle can also be significantly affected by the amount of bleed air taken from the engine, but this is not quite the 'environment', I suppose.

Of course, real control systems are a lot more complicated, even if we consider just the environmental parameters. For example, they can have numerous logical rules like: "if idle is selected after having maximum thrust for more than X seconds, ignore the pressure sensor and hold its value for Y seconds", or some such.