Giter Site home page Giter Site logo

sulueventbundle's Introduction

Sulu EventBundle

What does it do?

This bundle allows plug & play integration into a Sulu CMF instance for collecting events.

It has a strong integration into Sulu by using its category and media management sub-systems and all the APIs provided to integrate it nicely into the backend.

The frontend output can be freely integrated by using the shipped page template (see Integration chapter) and is dispatched via ESI tags (for the list view) and a standalone route for the detail view.

Integration

Kernel

Add the EventBundle to the AbstractKernel in order to use its back- and frontend modules:

// ... more bundles above

new Sulu\Bundle\EventBundle\SuluEventBundle(),

// ... more bundles below

Routing

The routing must be configured for both, website and admin contexts. Just add the lines below to the appropriate files.

app/config/admin/routing.yml

event_bundle:
    resource: "@SuluEventBundle/Resources/config/routing.yml"
    prefix: /admin/events

event_bundle_api:
    resource: "@SuluEventBundle/Resources/config/routing_api.yml"
    prefix: /admin/api

# for preview
event_bundle_website:
    resource: "@SuluEventBundle/Resources/config/routing_website.yml"

app/config/website/routing.yml

event_bundle:
    resource: "@SuluEventBundle/Resources/config/routing_website.yml"

Plug & play for editors

To let editors in the backend easily place the list output for events, you just have to add the following lines to the file app/config/sulu.yml.

sulu_core:
    ...
    content:
        structure:
            ...
            paths:
                ...
                sulu_event:
                    path: "%kernel.root_dir%/../vendor/sulu/event-bundle/Resources/pages"
                    internal: false
                    type: "page"

Configuration

In order to use the LoadEvents data fixture, you have to provide a valid Google Maps Api key and the path to the CSV file to import. Add the following setup to your config.yml:

sulu_event:
    google_maps_api_key: xxx
    sulu_event.csv_import_file: '%kernel.root_dir%/../data/my.csv'

You can find the format of the CSV file in DataFixtures/Events/events.csv.

API

Filters

The frontend filtering currently supports the following criteria:

  • searchString

    If the criteria lat and long are not given, the search is expanded to the city field of the event

  • eventIds

    CSV list of event ids

  • isTopEvent

    Boolean flag only top events are shown

  • categories

    CSV list of category ids

  • dateFrom

    \DateTime compatible date format

  • dateTo

    \DateTime compat date format

  • lat

    Latitude

  • long

    Longitude

  • area

    perimeter (german: "Umkreis") in kilometers (e.g. "50" for a 50km perimeter search)

sulueventbundle's People

Stargazers

Johannes Wachter avatar Joe Moser avatar Christopher Reitz avatar Mathias Ober avatar Thomas Schedler avatar

Watchers

Tommy Juhnke avatar Thomas Sliwa avatar Marco Wegner avatar Sebastian Faujour avatar Simon Lepel avatar James Cloos avatar Trung Nguyen avatar Mathias Ober avatar  avatar Jan Flögel avatar  avatar mw avatar  avatar Christopher Reitz avatar Enrico Rufnak avatar Rich avatar  avatar Thomas Ratajczak avatar  avatar  avatar

sulueventbundle's Issues

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.