Skip to content

Commit

Permalink
minor #1582 Reorganize docs and updated README (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the master branch (closes #1582).

Discussion
----------

Reorganize docs and updated README

Commits
-------

f7b84e9 Reorganize docs and updated README
  • Loading branch information
javiereguiluz committed Apr 8, 2017
2 parents c1cc1a5 + f7b84e9 commit 0c79587
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 169 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
**❮ NOTE ❯** This bundle releases new versions on a regular basis. Make sure
to update your dependencies frequently to get the latest version.
[Check out the changelog](https://github.com/javiereguiluz/EasyAdminBundle/releases)
to learn about the new features and read the [UPGRADE guide](https://github.com/javiereguiluz/EasyAdminBundle/blob/master/UPGRADE.md).

-----

EasyAdmin
=========

[![Build Status](https://travis-ci.org/javiereguiluz/EasyAdminBundle.svg?branch=master)](https://travis-ci.org/javiereguiluz/EasyAdminBundle)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/a3bfb8d9-7b2d-47ab-a95f-382af395bd51/mini.png)](https://insight.sensiolabs.com/projects/a3bfb8d9-7b2d-47ab-a95f-382af395bd51)
[![Coverage Status](https://coveralls.io/repos/javiereguiluz/EasyAdminBundle/badge.svg?branch=master)](https://coveralls.io/r/javiereguiluz/EasyAdminBundle?branch=master)
[![Symfony](https://img.shields.io/badge/Symfony-%202.x%20and%203.x-green.svg "Supports Symfony 2.x and 3.x")](https://symfony.com/)
[![Tests][1]][2] [![Code Quality][3]][4] [![Code Coverage][5]][6] [![Symfony 2.x and 3.x][7]][8]

EasyAdmin creates administration backends for your Symfony applications with
unprecedented simplicity.

<img src="https://raw.githubusercontent.com/javiereguiluz/EasyAdminBundle/master/Resources/doc/images/easyadmin-promo.png" alt="Symfony Backends created with EasyAdmin" align="right" />

EasyAdmin lets you create administration backends for Symfony applications
with unprecedented simplicity.
* [Installation](#installation)
* [Creating Your First Backend](#your-first-backend)
* [Documentation](#documentation)
* [Demo application](#demo-application)

**Features**

Expand All @@ -36,14 +31,9 @@ with unprecedented simplicity.
Documentation
-------------

#### Getting Started Guide

The [Getting Started Guide](Resources/doc/getting-started.md) explains how to
install the bundle and how to create your first backend. This guide is a must-
read before using EasyAdmin.

#### The Book

* [Chapter 0 - Installation and your first backend](Resources/doc/book/0-installation-and-first-backend.md)
* [Chapter 1 - Basic configuration](Resources/doc/book/1-basic-configuration.md)
* [Chapter 2 - Design configuration](Resources/doc/book/2-design-configuration.md)
* [Chapter 3 - `list`, `search` and `show` views configuration](Resources/doc/book/3-list-search-show-configuration.md)
Expand All @@ -62,16 +52,15 @@ read before using EasyAdmin.
* [How to manage configuration for complex backends](Resources/doc/tutorials/complex-backend-config.md)
* [Tips and tricks](Resources/doc/tutorials/tips-and-tricks.md)

#### Third-party bundles/services integrations
#### Integrations with third-party bundles/services

* [How to upload files and images with VichUploaderBundle](Resources/doc/tutorials/upload-files-and-images.md)
* [How to integrate FOSUserBundle to manage users](Resources/doc/tutorials/fosuserbundle-integration.md)
* [How to use a WYSIWYG editor with IvoryCKEditorBundle](Resources/doc/tutorials/wysiwyg-editor.md)
* [How To integrate FOSRestBundle and EasyAdmin](Resources/doc/tutorials/fosrestbundle-integration.md)

> **❮ NOTE ❯** you are reading the documentation of the bundle's **development**
> version. You can also [read the documentation of the latest stable version ➜]
> (https://github.com/javiereguiluz/EasyAdminBundle/tree/v1.16.8/).
> version. You can also [read the documentation of the latest stable version ➜](https://github.com/javiereguiluz/EasyAdminBundle/tree/v1.16.8/).
Demo Application
----------------
Expand Down Expand Up @@ -166,3 +155,12 @@ License
-------

This software is published under the [MIT License](LICENSE.md)

[1]: https://travis-ci.org/javiereguiluz/EasyAdminBundle.svg?branch=master
[2]: https://travis-ci.org/javiereguiluz/EasyAdminBundle
[3]: https://insight.sensiolabs.com/projects/a3bfb8d9-7b2d-47ab-a95f-382af395bd51/mini.png
[4]: https://insight.sensiolabs.com/projects/a3bfb8d9-7b2d-47ab-a95f-382af395bd51
[5]: https://coveralls.io/repos/javiereguiluz/EasyAdminBundle/badge.svg?branch=master
[6]: https://coveralls.io/r/javiereguiluz/EasyAdminBundle?branch=master
[7]: https://img.shields.io/badge/Symfony-%202.x%20and%203.x-green.svg
[8]: https://symfony.com/
140 changes: 140 additions & 0 deletions Resources/doc/book/0-installation-and-first-backend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
Chapter 0. Installation and Your First Backend
==============================================

EasyAdmin Project is the new and simple admin generator for Symfony
applications. In this chapter you'll learn how to install the bundle and how to
create your first backend.

Installation
------------

Installing EasyAdmin requires you to edit two files and execute two console
commands:

### Step 1: Download the Bundle

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:

```bash
$ composer require javiereguiluz/easyadmin-bundle
```

This command requires you to have Composer installed globally, as explained
in the [Composer documentation](https://getcomposer.org/doc/00-intro.md).

### Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the
`app/AppKernel.php` file of your project:

```php
<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
);
}

// ...
}
```

### Step 3: Load the Routes of the Bundle

Load the routes of the bundle by adding this configuration at the very beginning
of the `app/config/routing.yml` file:

```yaml
# app/config/routing.yml
easy_admin_bundle:
resource: "@EasyAdminBundle/Controller/"
type: annotation
prefix: /admin

# ...
```

### Step 4: Prepare the Web Assets of the Bundle

This bundle uses several CSS, JavaScript and font files to create the backend
interfaces. Execute the following command to make those assets available in your
Symfony application:

```cli
# Symfony 2
php app/console assets:install --symlink
# Symfony 3
php bin/console assets:install --symlink
```

That's it! Now everything is ready to create your first admin backend.

Your First Backend
------------------

Creating your first backend will take you less than 30 seconds. Let's suppose
that your Symfony application defines three Doctrine ORM entities called
`Product`, `Category` and `User`.

Open the `app/config/config.yml` file and add the following configuration:

```yaml
# app/config/config.yml
easy_admin:
entities:
- AppBundle\Entity\Product
- AppBundle\Entity\Category
- AppBundle\Entity\User
```
**Congratulations! You've just created your first fully-featured backend!**
Browse the `/admin` URL in your Symfony application and you'll get access to
the admin backend:

![Default EasyAdmin Backend interface](https://raw.githubusercontent.com/javiereguiluz/EasyAdminBundle/master/Resources/doc/images/easyadmin-default-backend.png)

### Expanded Configuration Format

This simple backend uses the shortcut configuration format, but for real
backends, you must use the extended configuration syntax instead, which allows
to configure lots of options for each entity:

```yaml
# app/config/config.yml
easy_admin:
entities:
Customer:
class: AppBundle\Entity\Customer
Order:
class: AppBundle\Entity\Order
Product:
class: AppBundle\Entity\Product
```

Entities are configured as elements under the `entities` key. The name of the
entities are used as the YAML keys. These names must be unique in the backend
and it's recommended to use the CamelCase syntax (e.g. `BlogPost` and not
`blog_post` or `blogPost`).

The only required option in this configuration format is called `class` and
defines the fully qualified class name of the Doctrine entity managed by the
backend.

-------------------------------------------------------------------------------

[Chapter 1. Basic Configuration](1-basic-configuration.md) &rarr;

[1]: ./book/configuration-reference.md
[2]: https://github.com/javiereguiluz/easy-admin-demo
[3]: ./tutorials/
[4]: https://github.com/javiereguiluz/EasyAdminBundle/issues
[5]: http://stackoverflow.com/questions/tagged/symfony2-easyadmin
2 changes: 1 addition & 1 deletion Resources/doc/book/1-basic-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ logged in the application. Otherwise it displays *"Anonymous User"*.

-------------------------------------------------------------------------------

[Chapter 2. Design Configuration](2-design-configuration.md) &rarr;
&larr; [Chapter 0. Installation and Your First Backend](0-installation-and-first-backend.md) | [Chapter 2. Design Configuration](2-design-configuration.md) &rarr;

[1]: ./6-menu-configuration.md
[2]: http://symfony.com/doc/current/book/security.html
148 changes: 2 additions & 146 deletions Resources/doc/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,150 +1,6 @@
Getting Started with EasyAdmin
==============================

Welcome to the **EasyAdmin Project**, the new (and simple) admin generator for
Symfony applications. In this guide you'll learn how to install the bundle and
how to create your first backend.
The contents of this guide have been moved to [the first chapter of the documentation][1].

Installation
------------

Installing EasyAdmin requires you to edit two files and execute two console
commands:

### Step 1: Download the Bundle

Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:

```bash
$ composer require javiereguiluz/easyadmin-bundle
```

This command requires you to have Composer installed globally, as explained
in the [Composer documentation](https://getcomposer.org/doc/00-intro.md).

### Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the
`app/AppKernel.php` file of your project:

```php
<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
);
}

// ...
}
```

### Step 3: Load the Routes of the Bundle

Load the routes of the bundle by adding this configuration at the very beginning
of the `app/config/routing.yml` file:

```yaml
# app/config/routing.yml
easy_admin_bundle:
resource: "@EasyAdminBundle/Controller/"
type: annotation
prefix: /admin

# ...
```

### Step 4: Prepare the Web Assets of the Bundle

This bundle uses several CSS, JavaScript and font files to create the backend
interfaces. Execute the following command to make those assets available in your
Symfony application:

```cli
# Symfony 2
php app/console assets:install --symlink
# Symfony 3
php bin/console assets:install --symlink
```

That's it! Now everything is ready to create your first admin backend.

Your First Backend
------------------

Creating your first backend will take you less than 30 seconds. Let's suppose
that your Symfony application defines three Doctrine ORM entities called
`Product`, `Category` and `User`.

Open the `app/config/config.yml` file and add the following configuration:

```yaml
# app/config/config.yml
easy_admin:
entities:
- AppBundle\Entity\Product
- AppBundle\Entity\Category
- AppBundle\Entity\User
```
**Congratulations! You've just created your first fully-featured backend!**
Browse the `/admin` URL in your Symfony application and you'll get access to
the admin backend:

![Default EasyAdmin Backend interface](https://raw.githubusercontent.com/javiereguiluz/EasyAdminBundle/master/Resources/doc/images/easyadmin-default-backend.png)

### Expanded Configuration Format

This simple backend uses the shortcut configuration format. In order to
customize the backend, you must use the extended configuration syntax instead,
which allows to configure lots of options for each entity:

```yaml
# app/config/config.yml
easy_admin:
entities:
Customer:
class: AppBundle\Entity\Customer
Order:
class: AppBundle\Entity\Order
Product:
class: AppBundle\Entity\Product
```

Entities are configured as elements under the `entities` key. The name of the
entities are used as the YAML keys. These names must be unique in the backend
and it's recommended to use the CamelCase syntax (e.g. `BlogPost` and not
`blog_post` or `blogPost`).

The only required option in this configuration format is called `class` and
defines the fully qualified class name of the Doctrine entity managed by the
backend.

What's Next?
------------

* Read the [EasyAdmin Documentation][1] to learn everything about its dozens
of features and configuration options.
* Check out the [EasyAdmin Demo application][2] to see how to easily create a
backend in a real Symfony application.
* Read the [EasyAdmin Tutorials][3] to learn about advanced features and
integrations with third-party bundles, such as VichUploaderBundle and
IvoryCKEditorBundle.

Do you have any question about this bundle? [Open an issue][4] in our official
repository or [post a question][5] in StackOverflow.

[1]: ./book/configuration-reference.md
[2]: https://github.com/javiereguiluz/easy-admin-demo
[3]: ./tutorials/
[4]: https://github.com/javiereguiluz/EasyAdminBundle/issues
[5]: http://stackoverflow.com/questions/tagged/symfony2-easyadmin
[1]: 0-installation-and-first-backend.md

0 comments on commit 0c79587

Please sign in to comment.