I am working on a custom Display plugin for Views. In my buildOptionsForm() method, I have the following:
$ form['inherit_yaxis'] = [ '#title' => $ this->t('The title'), '#type' => 'radios', '#options' => [ 1 => $ this->t('Inherit primary of parent display'), 0 => $ this->t('Create a secondary axis'), ], '#default_value' => $ this->getOption('inherit_yaxis'), '#description' => $ this->t('The description'), ];
In the optionsSummary(), if I do this:
$ options['inherit_yaxis']['value'] = $ this->getOption('inherit_yaxis');
It shows 1 or 0 rather than the label that I want (‘Inherit primary of parent display’ or ‘Create a secondary axis’).
What should be on the other side of $ options['inherit_yaxis']['value'] =
so that the label shows but the value stays either 0 or 1?