One would expect that the getHandler() method returns the handler object in both cases.
However while:
$executable->setDisplay($display_id);
$executable->getDisplay()->getHandler('field', $field['id']);
does return the actual handler,
$executable->getHandler($display_id, 'field', $field['id']);
just returns the configuration of the handler instance on a given display.
Can't we rename the latter to getHandlerConfiguration() or something?
This holds even more as ViewExecutable::getHandlers(string $type, string $display_id=NULL) returns an array of the actual handler instances.
We should also bring the arguments in line. getHandlers() takes the arguments the other way around, because it defaults to the current display, which is a good thing.
So I'd propose something like: ViewExecutable::getHandlerConfiguration(string $type, string $id, string $display_id=NULL) : array|null, defaulting to the current display, while deprecating the old ViewExecutable::getHandler(string $display_id, string $type, string $id) : array|null
Issue fork drupal-3034692
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #9
joachim commented+1
Tagging as novice.
Comment #15
joachim commentedRemember to set an issue to 'Needs review' when you create a merge request!
Looks like the MR has a few problems -- I see lots of git conflict markers, and it looks like the MR branch doesn't agree with the master branch the issue branch is forking from.