Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to specify Services instead of Classes for GridFieldAddNewMultiClass #278

Open
NightJar opened this issue Dec 12, 2018 · 0 comments

Comments

@NightJar
Copy link
Contributor

if (!$class || !array_key_exists($class, $classes)) {
throw new HTTPResponse_Exception(400);
}
$unsanitisedClass = $this->unsanitiseClassName($class);
$handler = Injector::inst()->create(

This check could easily become Injector::inst()->has( instead of class_exists(

And work will need to ensure compatibility with filtering that happens in getClasses:

if (!class_exists($class)) {
continue;
}
$is_abstract = (($reflection = new ReflectionClass($class)) && $reflection->isAbstract());

Note that this may need some effort to get GridFieldAddNewMultiClassHandler to play nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants