Amending a lightswitch field value inside a matrix, from a plugin?
You have to do: 

$matrixBlock-&gt;getContent()-&gt;setAttribute('secondLightswitch', '1');


You can only get attributes via magic methods but you can't set them