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

Callback option needed #25

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

derekvasilich
Copy link

Added option for specifying attributes for the Helper i.e. to provide a callback function

Added addition helper attributes to pass into the rendered element i.e. for specifying a callback
Recaptcha callback
Package name change
Changed repo name back
Fixing CI failures
@ADmad
Copy link
Collaborator

ADmad commented Oct 11, 2018

Any reason you can't specify the callback when loading component or the helper?

What you want can already be achieve using
$this->loadComponent('Recaptcha.Recaptcha', ['callback' => 'foo'])
or
$this->viewBuilder()->setHelpers(['Recaptcha.Recaptcha' => ['callback' => 'foo']]).

@derekvasilich
Copy link
Author

I don't see how that gets my data-callback attribute onto the view?

Or is what you're suggesting a way to get the attribute into the view, and so I would only need to commit the change to recaptcha view element?

@derekvasilich
Copy link
Author

Ok. It works the way you suggested with no alterations to the Helper.

Not sure the advantage of having it this way though.

Remove $xtraAttribs option
Callback option CI fix
src/Template/Element/recaptcha.ctp Outdated Show resolved Hide resolved
src/View/Helper/RecaptchaHelper.php Outdated Show resolved Hide resolved
@nachitox
Copy link
Contributor

Hi, what about the other callbacks? it would be useful to have an option for those too.

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

Successfully merging this pull request may close these issues.

3 participants