Merge pull request #593 from linux0uid/master

Added Symfony2 use.. snippets
This commit is contained in:
Louis Pilfold 2015-06-27 10:08:11 +01:00
commit 59cc3ecc79

View File

@ -278,6 +278,55 @@ snip.rv = re.match(r'.*(?=\.)', fn).group()
} }
endsnippet endsnippet
snippet redir "Symfony2 redirect" snippet redir "Symfony2 redirect" b
$this->redirect($this->generateUrl('${1}', ${2})); $this->redirect($this->generateUrl('${1}', ${2}));
endsnippet endsnippet
snippet usecontroller "Symfony2 use Symfony\..\Controller" b
use Symfony\Bundle\FrameworkBundle\Controller\Controller;${1}
endsnippet
snippet usereauest "Symfony2 use Symfony\..\Request" b
use Symfony\Component\HttpFoundation\Request;${1}
endsnippet
snippet useroute "Symfony2 use Sensio\..\Route" b
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;${1}
endsnippet
snippet useresponse "Symfony2 use Symfony\..\Response" b
use Symfony\Component\HttpFoundation\Response;${1}
endsnippet
snippet usefile "Symfony2 use Symfony\..\File" b
use Symfony\Component\HttpFoundation\File\UploadedFile;${1}
endsnippet
snippet useassert "Symfony2 use Symfony\..\Constraints as Assert" b
use Symfony\Component\Validator\Constraints as Assert;${1}
endsnippet
snippet usetemplate "Symfony2 use Sensio\..\Template" b
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;${1}
endsnippet
snippet usecache "Symfony2 use Sensio\..\Cache" b
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;${1}
endsnippet
snippet usemethod "Symfony2 use Sensio\..\Method" b
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;${1}
endsnippet
snippet usearray "Symfony2 use Doctrine\..\ArrayCollection" b
use Doctrine\Common\Collections\ArrayCollection;${1}
endsnippet
snippet useorm "Symfony2 use Doctrine\..\Mapping as ORM" b
use Doctrine\ORM\Mapping as ORM;${1}
endsnippet
snippet usesecure "Symfony2 use JMS\..\Secure" b
use JMS\SecurityExtraBundle\Annotation\Secure;${1}
endsnippet