On the basis of the energy conservation principle, we can affirm that an electrical energy source is a converter (device or electrical machine) which can transform another energy form (chemical, mechanical, thermal, solar, potential, kinetic) in electrical energy.
Examples of electrical energy sources:
Electric cell or battery - converts chemical energy in electrical energy
Photovoltaic panel - converts solar energy in electrical energy
Generator - converts mechanical, potential, kinetic or thermal energy in electrical energy.
Motor - converts electrical, potential, kinetic or thermal energy in mechanical energy.
An electric cell, when it is charged, is a converter which transforms electrical energy in chemical energy;
A generator can operate as a motor, converting the electrical energy aborbed in mechanical energy.
The photovoltaic panel is an example of a ireversible source. If it absorbed electrical energy, it couldn't convert it in solar energy.