Advertisement
asanchez75

Symfony

Mar 24th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. # http://symfony.com/doc/current/setup.html
  2. $ symfony new my_project_name 2.8
  3.  
  4. # run the local server
  5. $ php app/console server:run
  6.  
  7. # http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_bundle.html
  8. $ php app/console generate:bundle
  9.  
  10. # add these lines to your composer.json
  11.  
  12. "repositories": [
  13. {
  14. "type": "vcs",
  15. "url": "https://github.com/asanchez75/easyrdf-bundle.git"
  16. }
  17. ],
  18.  
  19. "require": {
  20. "conjecto/easyrdf-bundle": "dev-master as 0.1",
  21. "easyrdf/easyrdf": "^0.9.1"
  22. },
  23.  
  24. # run this command to download conjecto/easyrdf-bundle from https://github.com/asanchez75/easyrdf-bundle.git
  25. $ composer update
  26.  
  27. # Go to app/AppKernel/php and add these line to load EasyRdfBundle
  28.  
  29. new Conjecto\Bundle\EasyRdfBundle\EasyRdfBundle(),
  30.  
  31. # Install the bundle Assetic for Asset Management
  32. # http://symfony.com/doc/current/assetic/asset_management.html
  33.  
  34. $ composer require symfony/assetic-bundle
  35.  
  36. # Go to app/AppKernel/php and add these line to load AsseticBundle
  37. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  38.  
  39. # add the following minimal configuration to enable Assetic support on your application:
  40.  
  41. # app/config/config.yml
  42. assetic:
  43. debug: '%kernel.debug%'
  44. use_controller: '%kernel.debug%'
  45. filters:
  46. cssrewrite: ~
  47.  
  48. # ...
  49.  
  50. # generate assets
  51. $ php bin/console assetic:dump
  52.  
  53. # Install the bundle BraincraftedBootstrapBundle for Boostrap theme
  54. # https://github.com/braincrafted/bootstrap-bundle
  55.  
  56. # First you need to add braincrafted/bootstrap-bundle to composer.json:
  57.  
  58. {
  59. "require": {
  60. "braincrafted/bootstrap-bundle": "dev-master"
  61. }
  62. }
  63.  
  64. # You also have to add BraincraftedBootstrapBundle to your AppKernel.php:
  65.  
  66. // app/AppKernel.php
  67. //...
  68. class AppKernel extends Kernel
  69. {
  70. //...
  71. public function registerBundles()
  72. {
  73. $bundles = array(
  74. ...
  75. new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle()
  76. );
  77. //...
  78.  
  79. return $bundles;
  80. }
  81. //...
  82. }
  83.  
  84. # Install the bundles knp-menu-bundle and knp-paginator-bundle
  85. # http://symfony.com/doc/current/bundles/KnpMenuBundle/index.html
  86. # https://github.com/KnpLabs/KnpPaginatorBundle
  87.  
  88. $ composer require knplabs/knp-menu-bundle
  89. $ composer require knplabs/knp-paginator-bundle
  90.  
  91. # add the following minimal configuration to enable braincrafted_bootstrap support on your application:
  92. # http://bootstrap.braincrafted.com/getting-started.html
  93. # app/config/config.yml
  94. braincrafted_bootstrap:
  95. output_dir:
  96. assets_dir: %kernel.root_dir%/../vendor/twbs/bootstrap
  97. jquery_path: %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.10.2.js
  98. css_preprocessor: less # "less", "lessphp", "sass" or "none"
  99. fonts_dir: %kernel.root_dir%/../web/fonts
  100. auto_configure:
  101. assetic: false
  102. twig: true
  103. knp_menu: true
  104. knp_paginator: true
  105. customize:
  106. variables_file: ~
  107. bootstrap_output: %kernel.root_dir%/Resources/less/bootstrap.less
  108. bootstrap_template: BraincraftedBootstrapBundle:Bootstrap:bootstrap.less.twig
  109.  
  110. # to add customized css and js files
  111.  
  112. src/OntosidesBundle/Resources/public/css
  113. src/OntosidesBundle/Resources/public/js
  114.  
  115. # run this command to create a folde inside web/bundles wich contains symlinks to customized css and js files
  116.  
  117. $ php app/console assets:install web --symlink
  118. $ php app/console assetic:dump
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement