Skip to content

Commit

Permalink
Working on documentation...
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCelavi committed Jun 3, 2017
1 parent 431275f commit 4f28c12
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 22 deletions.
5 changes: 0 additions & 5 deletions ROLES.markdown

This file was deleted.

34 changes: 25 additions & 9 deletions Readme.markdown
@@ -1,8 +1,9 @@
Exchange rate bundle
====
====================

*Fetch, store and use currency exchange rates in your application*

Exchange rate bundle is Symfony2 and Symfony3 wrapper for [RunOpenCode/exchange-rate](https://github.com/RunOpenCode/exchange-rate)
Exchange rate bundle is Symfony wrapper for [RunOpenCode/exchange-rate](https://github.com/RunOpenCode/exchange-rate)
library.

[![Packagist](https://img.shields.io/packagist/v/RunOpenCode/exchange-rate-bundle.svg)](https://packagist.org/packages/runopencode/exchange-rate-bundle)
Expand All @@ -13,13 +14,28 @@ library.

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/7d45e1cd-63a2-474e-a252-9a11ee8faafb/big.png)](https://insight.sensiolabs.com/projects/7d45e1cd-63a2-474e-a252-9a11ee8faafb)

## Features

- Easy integration with exchange rate sources
(such as [National bank of Serba](https://github.com/RunOpenCode/exchange-rate-nbs)
and [Banca Intesa Serbia](https://github.com/RunOpenCode/exchange-rate-intesa-rs)) via configuration.
- Console commands for debugging configuration.
- Console commands for fetching configured rates via cron tasks or queue
implementations.
- Configurable e-mail notifications support for successful retrieval of
rates, as well as errors.
- CRUD controllers for viewing, editing, deleting and creating rates, with
configurable role-based security.
- Public REST api enabling you to deliver rates to other applications
and third parties.
- Easy extensibility and customization of each portion of bundle.

## License

Bundle is in active development phase, currently is in beta stage, unit testing must be completed and documentation must be
written.
This bundle is published under MIT license. Please see [LICENSE](LICENSE) file distributed
with this package.

TODO:
## Documentation

- Provide unit tests
- Provide documentation
- Write Doctrine ORM repository
- Write Doctrine Document repository
For more detailed information about the features of this bundle,
refer to the [documentation](docs/index.md).
Empty file added docs/configuration.md
Empty file.
33 changes: 29 additions & 4 deletions docs/index.md
@@ -1,6 +1,31 @@
Exchange rate bundle
====
*Fetch, store and use currency exchange rates in your application*
====================

Exchange rate bundle is Symfony3 wrapper for [RunOpenCode/exchange-rate](https://github.com/RunOpenCode/exchange-rate)
library.
*Fetch, store and use currency exchange rates in your Symfony application*

Exchange rate bundle is Symfony wrapper for [RunOpenCode/exchange-rate](https://github.com/RunOpenCode/exchange-rate)
library.

It will enable you to easily fetch, query and manage exchange rates in your
Symfony application when dealing with payments and prices in foreign currencies.

## Features

- Easy integration with exchange rate sources
(such as [National bank of Serba](https://github.com/RunOpenCode/exchange-rate-nbs)
and [Banca Intesa Serbia](https://github.com/RunOpenCode/exchange-rate-intesa-rs)) via configuration.
- Console commands for debugging configuration.
- Console commands for fetching configured rates via cron tasks or queue
implementations.
- Configurable e-mail notifications support for successful retrieval of
rates, as well as errors.
- CRUD controllers for viewing, editing, deleting and creating rates, with
configurable role-based security.
- Public REST api enabling you to deliver rates to other applications
and third parties.
- Easy extensibility and customization of each portion of bundle.

## Table of contents

- [Instalation](installation.md)
- [Configuration](configuration.md)
35 changes: 35 additions & 0 deletions docs/installation.md
@@ -0,0 +1,35 @@
Installation
============

## 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
and add it as a dependency to your project:

composer require runopencode/exchange-rate-bundle

## Step 2. - Enable the Bundle

Enable the bundle by adding `new RunOpenCode\Bundle\ExchangeRate\ExchangeRateBundle()`
to the bundles array of the registerBundles method in your project's
`app/AppKernel.php` file:

<?php

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new RunOpenCode\Bundle\ExchangeRate\ExchangeRateBundle()
);
// ...
}
// ...
}

Expand Up @@ -45,7 +45,7 @@ public function indexAction(Request $request)
return $this->redirectAfterSuccess();
}

return $this->render('@ExchangeRate/create.html.twig', [
return $this->render($this->getTwigTemplate(), [
'form' => $form->createView(),
]);
}
Expand Down Expand Up @@ -131,4 +131,14 @@ protected function redirectAfterSuccess()
{
return $this->redirectToRoute('runopencode_exchange_rate_list');
}

/**
* Get Twig template path.
*
* @return string
*/
protected function getTwigTemplate()
{
return '@ExchangeRate/create.html.twig';
}
}
Expand Up @@ -31,7 +31,7 @@ class DeleteController extends Controller
*/
public function indexAction(Request $request)
{
return $this->render('@ExchangeRate/delete.html.twig', [
return $this->render($this->getTwigTemplate(), [
'rate' => $this->getRateFromRequest($request)
]);
}
Expand Down Expand Up @@ -121,4 +121,14 @@ protected function redirectAfterSuccess()
{
return $this->redirectToRoute('runopencode_exchange_rate_list');
}

/**
* Get Twig template path.
*
* @return string
*/
protected function getTwigTemplate()
{
return '@ExchangeRate/delete.html.twig';
}
}
Expand Up @@ -61,7 +61,7 @@ public function indexAction(Request $request)
return $this->redirectAfterSuccess();
}

return $this->render('@ExchangeRate/edit.html.twig', [
return $this->render($this->getTwigTemplate(), [
'form' => $form->createView(),
'rate' => $rate
]);
Expand Down Expand Up @@ -144,4 +144,14 @@ protected function redirectAfterSuccess()
{
return $this->redirectToRoute('runopencode_exchange_rate_list');
}

/**
* Get Twig template path.
*
* @return string
*/
protected function getTwigTemplate()
{
return '@ExchangeRate/edit.html.twig';
}
}
Expand Up @@ -38,7 +38,7 @@ public function indexAction(Request $request)

$filterForm = $this->getFilterForm($request);

return $this->render('@ExchangeRate/list.html.twig', [
return $this->render($this->getTwigTemplate(), [
'rates' => $this->getRates($filterForm),
'form' => $filterForm->createView(),
]);
Expand Down Expand Up @@ -90,4 +90,14 @@ protected function getFilterFormType()
{
return FilterType::class;
}

/**
* Get Twig template path.
*
* @return string
*/
protected function getTwigTemplate()
{
return '@ExchangeRate/list.html.twig';
}
}

0 comments on commit 4f28c12

Please sign in to comment.