There are 2 main modes on the Flexity for the doors, "all doors" and "enable". All doors opens all of the doors when pressed, and closes all of them when pressed again, it's intended for very high-traffic stops and end-of-line stations. Enable makes it so that individual doors open when the button on them is pressed, and they close automatically after a few seconds if nobody is walking through, or when the operator presses enable again; this mode is intended to be used at the majority of stops, mainly to keep the cold/hot air in the vehicle rather than letting in outside air of an undesirable temperature.
Both modes trigger a single chime, and a high-pitched tone for some reason, when they open. All doors results in the traditional 3 chimes when they close, whereas Enable triggers the single chime. As such, some operators who prefer all doors have discovered a trick--they open all doors, then when it's time to close them instead of pressing all doors 1 time they press enable 2 times, which switches the doors to enable mode and closes them with the shorter single chime.
Unfortunately, in my experience, the majority of operators open all doors the majority of the time, which really sucks in the summer/winter. It's gotten a bit better recently, but nowhere near what it should be.
As for the sensors, you can clearly see multiple infrared sensors just inside of each doorway, which form a sort of "tripwire", if someone is detected within it they won't close in the automatic enable mode, they will only close if the operator closes them. I've found when the operator closes the doors from the cab, passengers are expected to stand clear, and the doors only stop closing if someone physically blocks them.