Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SF2][SF]Widoki .php zamiast .twig
basso
post
Post #1





Grupa: Zarejestrowani
Postów: 155
Pomógł: 1
Dołączył: 12.12.2010

Ostrzeżenie: (0%)
-----


Witam,

Chciałem używać samych widoków .php nie twig. Kojarzy ktoś gdzie to zmienić?

Zmieniałem dotychczas w:
config.yml
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme

Jak dam tak:
templating: { engines: ['php'] } #assets_version: SomeVersionScheme
to wywala mi błąd "ServiceNotFoundException: The service "twig" has a dependency on a non-existent service "assetic.twig_extension"."


Chodzi też o to, aby przy tworzeniu nowego bundla, albo przy generowaniu CRUD widoki były w postaci .php , bo teraz są tworzone jako .twig.
1. Czy może się nie da tak?

Nie wiem jak używać samych widoków php. Może ktoś wie, gdzie jeszcze trzeba dokonać modyfikacji.


Pozdrawiam i z góry dziękuję.

Ten post edytował basso 21.04.2013, 16:19:02
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 7)
matiit
post
Post #2





Grupa: Zarejestrowani
Postów: 365
Pomógł: 70
Dołączył: 5.04.2009

Ostrzeżenie: (0%)
-----


http://symfony.com/doc/2.0/cookbook/templating/PHP.html
Go to the top of the page
+Quote Post
basso
post
Post #3





Grupa: Zarejestrowani
Postów: 155
Pomógł: 1
Dołączył: 12.12.2010

Ostrzeżenie: (0%)
-----


Hej dzięki za linka. czytałem to... mi chodzi o sam ['php'].

Konstrukcja templating: { engines: ['twig', 'php'] } nadal generuje templatki i widoki .twig ;/
Go to the top of the page
+Quote Post
destroyerr
post
Post #4





Grupa: Zarejestrowani
Postów: 879
Pomógł: 189
Dołączył: 14.06.2006
Skąd: Bytom

Ostrzeżenie: (0%)
-----


Jezeli chodzi o generowanie szablonow to tego nie da sie zmienic. Musialbys napisac wlasnego generatora.
Co do konfiguracji to fajnie by bylo jakbys wrzucil jeszcze caly plik konfiguracyjny (glownie chodzi o twig i assetic), dodatkowo napisz czy masz zainstalowany AsseticBundle.

Po za tematem: dlaczego PHP a niew Twig?
Go to the top of the page
+Quote Post
basso
post
Post #5





Grupa: Zarejestrowani
Postów: 155
Pomógł: 1
Dołączył: 12.12.2010

Ostrzeżenie: (0%)
-----


  1. imports:
  2. - { resource: parameters.yml }
  3. - { resource: security.yml }
  4.  
  5. framework:
  6. #esi: ~
  7. #translator: { fallback: "%locale%" }
  8. secret: "%secret%"
  9. router:
  10. resource: "%kernel.root_dir%/config/routing.yml"
  11. strict_requirements: "%kernel.debug%"
  12. form: true
  13. csrf_protection: true
  14. validation: { enable_annotations: true }
  15. templating: { engines: ['twig','php'] } #assets_version: SomeVersionScheme
  16. default_locale: "%locale%"
  17. trust_proxy_headers: false # Deprecated in 2.0; will be removed in 2.3 (used trusted_proxies instead)
  18. trusted_proxies: ~
  19. session: ~
  20.  
  21. # Twig Configuration
  22. twig:
  23. debug: "%kernel.debug%"
  24. strict_variables: "%kernel.debug%"
  25.  
  26.  
  27. # Assetic Configuration
  28. assetic:
  29. debug: "%kernel.debug%"
  30. use_controller: false
  31. bundles: [ ]
  32. #java: /usr/bin/java
  33. filters:
  34. cssrewrite: ~
  35. #closure:
  36. # jar: "%kernel.root_dir%/Resources/java/compiler.jar"
  37. #yui_css:
  38. # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
  39.  
  40. # Doctrine Configuration
  41. doctrine:
  42. dbal:
  43. driver: "%database_driver%"
  44. host: "%database_host%"
  45. port: "%database_port%"
  46. dbname: "%database_name%"
  47. user: "%database_user%"
  48. password: "%database_password%"
  49. charset: UTF8
  50.  
  51. orm:
  52. auto_generate_proxy_classes: "%kernel.debug%"
  53. auto_mapping: true
  54. mappings:
  55. StofDoctrineExtensionsBundle: ~
  56.  
  57. # Swiftmailer Configuration
  58. swiftmailer:
  59. transport: "%mailer_transport%"
  60. host: "%mailer_host%"
  61. username: "%mailer_user%"
  62. password: "%mailer_password%"
  63. spool: { type: memory }
  64.  
  65.  
  66.  
  67. stof_doctrine_extensions:
  68. default_locale: en_US
  69. orm:
  70. default:
  71. sluggable: true
  72.  
  73. parameters:
  74. genders:
  75. visible: Male
  76. invisible: Female
  77.  



No w sumie to nie wiem, jakoś się boję tego twig, że może mi coś zabraknąć ;/
Jest coś takiego zainstalowaneg: "symfony/assetic-bundle": "2.1.*", ale w vendorach tego nie widzę tylko w composer.json

Ten post edytował basso 22.04.2013, 19:48:26
Go to the top of the page
+Quote Post
skowron-line
post
Post #6





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

Ostrzeżenie: (0%)
-----


A zrobiłeś update composera ?


--------------------
I'm so fast that last night I turned off the light switch in my hotel room and was in bed before the room was dark - Muhammad Ali.
Peg jeżeli chcesz uprawiać sex to dzieci muszą wyjść, a jeżeli chcesz żeby był dobry ty też musisz wyjść - Al Bundy.

QueryBuilder, Mootools.net, bbcradio1::MistaJam
http://www.phpbench.com/
Go to the top of the page
+Quote Post
basso
post
Post #7





Grupa: Zarejestrowani
Postów: 155
Pomógł: 1
Dołączył: 12.12.2010

Ostrzeżenie: (0%)
-----


tak tak... znaczy ściągłem najnowszą wersję i zainstalowałem smile.gif
bo nie wiem jak z konsoli wykonać update samego komposera
Go to the top of the page
+Quote Post
mimol
post
Post #8





Grupa: Zarejestrowani
Postów: 247
Pomógł: 5
Dołączył: 10.12.2007

Ostrzeżenie: (0%)
-----


Kod
composer self-update
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 07:28