Chciałem zainstalować twitter boostrap, aby móc je wykorzystać w projekcie.
Mam taki prosty widok testowy.
{% extends '::base.html.twig' %} {% block body %} {{ 'Success'|label('success') }} {% endblock %}
Gdy uruchamiam controller dostaje taki oto błąd:
The filter "label" does not exist in LingogoAdminBundle:PartOfSpeech:index.html.twig at line 5
Tak wygląda moj plik base.html.twig
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="../../assets/ico/favicon.ico"> <!-- Bootstrap core CSS --> {% stylesheets '../vendor/twbs/bootstrap/dist/css/bootstrap.min.css' %} <link href="{{ asset_url }}" rel="stylesheet"> {% endstylesheets %} <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> {% block body %}{% endblock %} </div><!-- /.container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> </body> </html>
tak wygląda plik config.yml
imports: - { resource: parameters.yml } - { resource: security.yml } framework: #esi: ~ translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini handler_id: ~ fragments: ~ http_method_override: true # Twig Configuration twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%" # Assetic Configuration assetic: debug: "%kernel.debug%" use_controller: false bundles: [ ] #java: /usr/bin/java filters: cssrewrite: ~ #closure: # jar: "%kernel.root_dir%/Resources/java/compiler.jar" #yui_css: # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" lessphp: file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php apply_to: "\.less$" # Doctrine Configuration doctrine: dbal: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: UTF8 # if using pdo_sqlite as your database driver, add the path in parameters.yml # e.g. database_path: "%kernel.root_dir%/data/data.db3" # path: "%database_path%" orm: auto_generate_proxy_classes: "%kernel.debug%" auto_mapping: true # Swiftmailer Configuration swiftmailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory } hwi_oauth: resource_owners: any_name: type: facebook client_id: <client_id> client_secret: <client_secret> twitter_provider: type: twitter client_id: <consumer-key> client_secret: <consumer-secret> # name of the firewall in which this bundle is active, this setting MUST be set firewall_name: secured_area services: my.oauth_aware.user_provider.service: class: HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider arguments: userManager: "@fos_user.user_manager" properties: ["pass properties as array"] fos_user: db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' firewall_name: main user_class: Acme\DemoBundle\Entity\User braincrafted_bootstrap: less_filter: lessphp
Męcze się z tym już drugi dzień i już nie mam pomysłów co może być nie tak.
Całość kodu można zobaczyć na https://bitbucket.org/pbrzoski/lingogo/