Coder Social home page Coder Social logo

simpleschedulebundle's Introduction

SimpleScheduleBundle

A simple Schedule Bundle for Symfony2

Instalation

To install this bundle please follow the next steps:

First add the dependency to your composer.json file:

"require": {
    ...
    "pagerfanta/pagerfanta":           "dev-master",
    "white-october/pagerfanta-bundle": "dev-master",
    "idci/exporter-bundle":            "dev-master",
    "idci/simple-schedule-bundle":     "dev-master"
},

Then install the bundle with the command:

php composer update

Enable the bundle in your application kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        new IDCI\Bundle\ExporterBundle\IDCIExporterBundle(),
        new IDCI\Bundle\SimpleScheduleBundle\IDCISimpleScheduleBundle()
    );
}

Now the Bundle is installed.

Configure your database parameters in the app/config/parameters.yml then run

php app/console doctrine:schema:update --force

Add the following lines in the routing.yml:

For the query interfaces:

idci_simple_schedule:
    resource: "@IDCISimpleScheduleBundle/Controller/QueryController.php"
    type:     annotation

Add the following lines in the config.yml:

imports:
    - { resource: @IDCISimpleScheduleBundle/Resources/config/config.yml }

...

twig:
    form:
        resources:
            - 'IDCISimpleScheduleBundle:Form:meta_widget.html.twig'

TODO:

  • How to use the admin provided with the bundle:
  • How to override this bundle

Query parameter:

This bundle can be use through a web API. To query this api simply use this url /api/query?[params]

The main parameters are:

  • format: xml (default), json, jsonp, csv, ics (for event entity)
  • entity: Event (default), Location, Category

Exemples:

To query all the locations in the json format: /api/query?entity=Location&format=json
To query all the events in the ics format: /api/query?entity=Event&format=ics
To query all the category in the xml format: /api/query?entity=Category&format=xml or /api/query?entity=Category

You can also use more specific query parameters for each entity as folow:

Location:

  • id => id=x
  • ids => ids[]=x&ids[]=y

Category:

  • id => id=x
  • ids => ids[]=x&ids[]=y
  • level => level=0
  • parent_category_id
  • parent_category_ids
  • ancestor_category_id
  • ancestor_category_ids
  • location_id
  • all_in_location_id

Event:

  • id => id=x
  • ids => ids[]=x&ids[]=y
  • category_id
  • category_ids
  • parent_category_id
  • parent_category_ids
  • ancestor_category_id
  • ancestor_category_ids
  • location_id
  • location_ids

Todo ~ TER ;)

  • xproperty_namespace
  • xproperty_key
  • xproperty_value

simpleschedulebundle's People

Contributors

konandrum avatar ovski4 avatar

Forkers

benoitddlp

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.