Issue #1988614 by aroq: Adjust hook_options_list_alter() example in options.api.php to use ->id() instead of ->id.

8.0.x
Alex Pott 2013-05-12 18:52:29 +01:00
parent f0aee215cd
commit 88572e46ff
1 changed files with 1 additions and 1 deletions

View File

@ -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 ==');
}