Commit 88572e46 authored by alexpott's avatar alexpott

Issue #1988614 by aroq: Adjust hook_options_list_alter() example in...

Issue #1988614 by aroq: Adjust hook_options_list_alter() example in options.api.php to use ->id() instead of ->id.
parent f0aee215
......@@ -92,7 +92,7 @@ function hook_options_list($field, $instance, $entity) {
*/
function hook_options_list_alter(array &$options, array $context) {
// Check if this is the field we want to change.
if ($context['field']->id == 'field_option') {
if ($context['field']->id() == 'field_option') {
// Change the label of the empty option.
$options['_none'] = t('== Empty ==');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment