Giter Site home page Giter Site logo

examplenewsbundle's Introduction

Sulu ExampleNewsBundle Tutorial

This is a step-by-step tutorial how to create an extension for Sulu. Each step is explained as a pull request against the previous step and with additional information in a blog-post on blog.sulu.io. It was built with the releases 1.1.* of Sulu.

Documentation

The master contains the whole code to run the example. The code foreach step comes in a single branch that build on the previous one. The first branch 00-symfony-bundle is a simple bundle-bootstrap which was generated by Symfony's generate:bundle command.

The steps are explained as pull requests, each building upon the previous branch and contains descriptions in form of comments and a link to the related blog-post.

Installation

To install the example use a fresh clone from sulu-standard and run following commands to clone this Repository into the right folder.

mkdir src/Example
cd src/Example
git clone https://github.com/sulu-io/ExampleNewsBundle.git NewsBundle

Apply following patch to enable and configure ExampleNewsBundle:

diff --git a/app/AbstractKernel.php b/app/AbstractKernel.php
index 8d149aa..e180d35 100644
--- a/app/AbstractKernel.php
+++ b/app/AbstractKernel.php
@@ -66,6 +66,8 @@ abstract class AbstractKernel extends SuluKernel
 
             // tools
             new Massive\Bundle\BuildBundle\MassiveBuildBundle(),
+
+            new Example\NewsBundle\ExampleNewsBundle(),
         ];
 
         if (in_array($this->getEnvironment(), ['dev', 'test'])) {
diff --git a/app/config/admin/routing.yml b/app/config/admin/routing.yml
index ae2ceb4..7047e47 100644
--- a/app/config/admin/routing.yml
+++ b/app/config/admin/routing.yml
@@ -88,3 +88,8 @@ client_website:
 sulu_search:
     resource: "@SuluSearchBundle/Resources/config/routing.yml"
     prefix: /admin/search
+
+example_news:
+    resource: "@ExampleNewsBundle/Resources/config/routing_api.xml"
+    type: rest
+    prefix: /admin/api

To build the translations follow the tutorial part 5.

At the end run following command to install assets of this bundle and update the database:

app/console assets:install --symlink --relative
app/console doctrine:schema:update --force

See also

  • Sulu - Source code of Sulu
  • Sulu documentation - Full documentation of Sulu
  • Sulu blog - Our developers publish periodically blog-posts
  • Sulu demo - The demo which represents the current releases
  • Sulu homepage - Introduction to Sulu and more information for decision makers

examplenewsbundle's People

Contributors

alexander-schranz avatar chirimoya avatar wachterjohannes avatar

Watchers

 avatar  avatar

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.