Skip to content

Instantly share code, notes, and snippets.

View mops1k's full-sized avatar
🤡
working as crazy elephant 💃

Kvintilyanov Aleksandr mops1k

🤡
working as crazy elephant 💃
  • Russia, Moscow
View GitHub Profile
<?php
namespace Acme\HelloBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)
@mops1k
mops1k / form.js
Created November 29, 2015 22:17 — forked from Graceas/form.js
Symfony 2 used FormErrorsSerializer.php with jQuery.
function form_callback(target)
{
target = $(target);
$.ajax({
url: target.attr('action'),
type: target.attr('method'),
data: target.serialize(),
dataType: 'json',
beforeSend: function() {
//clear errors