From e573b3020c032400eed60b649a2cbf55266e6bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:03:25 +0200 Subject: Add current configurations from old repository --- .../vim-snippets/UltiSnips/php-symfony2.snippets | 360 +++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 vim/bundle/vim-snippets/UltiSnips/php-symfony2.snippets (limited to 'vim/bundle/vim-snippets/UltiSnips/php-symfony2.snippets') diff --git a/vim/bundle/vim-snippets/UltiSnips/php-symfony2.snippets b/vim/bundle/vim-snippets/UltiSnips/php-symfony2.snippets new file mode 100644 index 0000000..2b127ee --- /dev/null +++ b/vim/bundle/vim-snippets/UltiSnips/php-symfony2.snippets @@ -0,0 +1,360 @@ +# sugguestion? report bugs? +# go to https://github.com/chrisyue/vim-snippets/issues + +priority -50 + +snippet classn "Basic class with namespace snippet" b +setName('${1}') + ->setDescription('${2}') + ->setDefinition([ + new InputArgument('', InputArgument::REQUIRED, ''), + new InputOption('', null, InputOption::VALUE_NONE, ''), + ]); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + } +} +endsnippet + +snippet subs "Symfony2 subscriber" b +setDefaults(); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return '${1}'; + } +} +endsnippet + +snippet ev "Symfony2 event" b +redirect($this->generateUrl('${1}', ${2})); +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 + -- cgit v1.2.3