I'm currently using the cshs in a view where the options need to be filtered programmatically to subtract the ones a specific user hasn't access to. It used to work in version 1.3 of the module when the options were an array instead of an object.
Iterating through the form element returns an error when trying to access the parent of an option.
foreach($filter_identifier['#options'] as $zone_id => $object){
dpm($option->parent);
// if the option key or its parent is not in the user's allowed zones, remove the option from the cshs form element.
}
Error: Cannot access protected property Drupal\cshs\Component\CshsOption::$parent
What would be the impact of making this property public?
Is there another way for me the filter the options on the fly from a hook_form_views_exposed_form_alter?
Active
3.6
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.