GithubHelp home page GithubHelp logo

haagvivi / symfonybundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prismicio/symfonybundle

0.0 2.0 0.0 144 KB

Inntegrates the http://prismic.io php-kit with the Symfony Framework

Home Page: http://prismic.io

PHP 100.00%

symfonybundle's Introduction

PrismicBundle

This Bundle integrates the http://prismic.io php-kit with the Symfony Framework: https://github.com/prismicio/php-kit

For an example use see: https://github.com/prismicio/php-symfony-starter

Installation

Add the following dependencies to your projects composer.json file:

"require": {
    # ..
    "prismic/prismic-bundle": "~1.0@dev"
    # ..
}

Configuration

Add the following configuration to your projects app/config/config.yml file:

# Default configuration for extension with alias: "prismic"
prismic:
    api:
        endpoint:             ~ # Required
        access_token:         ~
        client_id:            ~
        client_secret:        ~

If you would like to have OAuth authentication in your app so you can preview upcoming releases for example. You must import the OAuth specific routes in your app/config/routing.yml file:

# Default OAuth routes which will redirect to the "home" route after signin/signout
prismic_oauth:
    resource: "@PrismicBundle/Resources/config/routing/oauth.xml"

You can override the redirect route from the bundle configuration:

# Default configuration for extension with alias: "prismic"
prismic:
    oauth:
        redirect_route:         home # Name of the route
        redirect_route_params:  []   # An array with additional route params

TODOs

  • Add a listener for Symfony 2.3 to set the request data into the context as 2.3 does not support ExpressionLanguage
  • Add unit (and functional?) tests
  • Provide twig templates to render documents
  • Make caching configurable once prismicio-community/php-kit#32 is implemented

Credits

Kudos to lsmith77 who did all the hard work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.