Skip to content

Instantly share code, notes, and snippets.

View jerronimo's full-sized avatar

Eugene Kashkarov jerronimo

  • Kharkiv
View GitHub Profile
@jerronimo
jerronimo / README.md
Created August 21, 2018 15:53 — forked from Tom32i/README.md
Simple list hydrator for Symfony2

Simple list hydrator for #Syfmony2

Sample User repository method that return all user names in an array:

/**
 * Find user names
 *
 * @return array
 */

public function findAllNames()

@jerronimo
jerronimo / accessDeniedListener.php
Created November 3, 2017 01:31 — forked from charliepage88/accessDeniedListener.php
Functionality to override symfony 403 Error Access denied. Sets flash message and redirect (back to previous page, or homepage)
<?php
namespace Atd\UserBundle\Listener;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent,
Symfony\Component\Security\Core\Exception\AccessDeniedException,
Symfony\Component\HttpFoundation\Request,
Symfony\Component\HttpFoundation\RedirectResponse,
Symfony\Component\HttpFoundation\Session\Session,
Symfony\Component\Routing\Router;
@jerronimo
jerronimo / stripe-checkout.html
Created November 1, 2017 21:17 — forked from ziadoz/stripe-checkout.html
Custom Stripe Checkout Button
<form action="." method="post">
<noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript>
<input
type="submit"
value="Pay with Card"
data-key="PUBLISHABLE STRIPE KEY"
data-amount="500"
data-currency="cad"
data-name="Example Company Inc"