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

Better API for adding buttons to form #1

Merged
merged 2 commits into from
Jul 14, 2014
Merged

Conversation

vojtech-dobes
Copy link
Contributor

Allows following syntax:

$form->addPaymentButtons(array(
   $this->processForm,
));

Or even:

use Markette\Gopay;

$form->addPaymentButton(Gopay\Service::METHOD_GOPAY)
    ->onClick[] = $this->processGopayMethod;

$button->onClick[] = $callback;
}

$this->allowedChannels[$name]->control = 'gopayChannel' . $name;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually not sure, if this line is neccessary. I have no idea, what is its purpose :D.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, remove it ! :) we will try :D

@jkuchar
Copy link

jkuchar commented Jul 14, 2014

bump

vojtech-dobes added a commit that referenced this pull request Jul 14, 2014
Better API for adding buttons to form
@vojtech-dobes vojtech-dobes merged commit fcc894c into master Jul 14, 2014
@vojtech-dobes vojtech-dobes deleted the feature-formMethods branch July 14, 2014 20:30
@xificurk
Copy link

WTF? What version of Nette is this for?

AFAIK Nette\Forms\Container::registerMethod() never existed and Nette\DI\CompilerExtension::afterCompile() always had incompatible signature.

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

Successfully merging this pull request may close these issues.

None yet

4 participants