[Cookbook][Security] Update Voters: add class properties

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.2 only (issue is fixed for 2.3+ in #3216)
| Fixed tickets | -

Added class properties.