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

Make InputfieldFile::getDisplayBasename() a public method #147

Open
teppokoivula opened this Issue Jan 7, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@teppokoivula

teppokoivula commented Jan 7, 2018

While developing a new version of the Version Control module, I've run into a bit of a problem with the InputfieldFile::getDisplayBasename() method:

I'm hooking into InputfieldFile::renderItem() in order to change the display name to a custom value, but since getDisplayBasename() is a protected method, I can't use it directly, but rather need to implement identical code in the module itself – something that I'd like to avoid if possible :)

Making getDisplayBasename() public would fix this, so I'm wondering if this change would be feasible?

@teppokoivula

This comment has been minimized.

Show comment
Hide comment
@teppokoivula

teppokoivula Jan 9, 2018

Alternative idea: this method could be in line with some features already in Functions.php, so perhaps it should be moved there? Not sure if there's enough use for it, though.

I was going to suggest adding thist to Sanitizer, but that doesn't seem like a good fit at all: Sanitizer should be about sanitizing stuff, and this is not (really) that. If only there was a Formatter API variable... :)

teppokoivula commented Jan 9, 2018

Alternative idea: this method could be in line with some features already in Functions.php, so perhaps it should be moved there? Not sure if there's enough use for it, though.

I was going to suggest adding thist to Sanitizer, but that doesn't seem like a good fit at all: Sanitizer should be about sanitizing stuff, and this is not (really) that. If only there was a Formatter API variable... :)

@ryancramerdesign

This comment has been minimized.

Show comment
Hide comment
@ryancramerdesign

ryancramerdesign Jan 9, 2018

Contributor
Contributor

ryancramerdesign commented Jan 9, 2018

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