I have a field that is a checkbox with multiple values... I'm trying to do an evaluation in a condition plugin where I'm checking against the checked values. For a boolean field, the syntax is:
$value = $this->getContextValue('node')->field_news_filter_menus->value;
Since field_news_filter_menus is a checkboxes field, I need to get the array of checked values. These all return null:
$this->getContextValue('node')->field_news_filter_menus->list->values;
$this->getContextValue('node')->field_news_filter_menus->values;
$this->getContextValue('node')->field_news_filter_menus->list;
PHPstorm xdebug says the path is
$this->getContextValue('node')->field_news_filter_menus->list[0]->value;
But null is returned for that also. I can see the values in xdebug that follow a path as
$this->getContextValue('node')->field_news_filter_menus->list[0]->values
and see an expected value, but that path also returns null.
What is the syntax for getting that array list?