<commit_before># Raindrop Page Bundle

This bundle offers a simple CMS mechanism based on SonataAdminBundle + stuffs and FOSUserBundle.
We also use some proprietary bundle.
This bundle exists as an alternate approach to SonataPageBundle, in particular it is more
database oriented for long term and continuous maintenance and the administration is all
bound to a backend application (no frontend inline editing. As alternative option, preview is into roadmap).


### **INSTALLATION**:

First add the dependency to your `composer.json` file:

    "require": {
        ...
        "raindrop/page-bundle": "dev-master"
    },

Then install the bundle with the command:

    php composer.phar update

Enable the bundle in your application kernel:

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

public function registerBundles()
{
    $bundles = array(
        // ...
        new Raindrop\TwigLoaderBundle\RaindropPageBundle(),
    );
}
```

Now the bundle is enabled.

### **CONFIGURATION**:

First of all update your schema:
    php app/console doctrine:schema:update --force (for development environment)
now it is up to your strategy... the production should migrate similarly or execute a query as result to following
    php app/console doctrine:schema:update --dump-sql

There is no need for yml configuration except for the fact that you maybe
want PageAdmin to show up into your dashboard:

    sonata_block:
        default_contexts: [cms]
        blocks:
            raindrop_page.block.service.template: // <---- add this line
            sonata.admin.block.admin_list:
                contexts:   [admin]

### **USAGE**:

#### Load template from database:

``` php
class myController {
	public function indexAction() {
		return $this->render('database:contact_us_en');
	}
}
```

The database loader will load the template using <entity>::getData() method and pass result to controller render method.<commit_msg>fix typo<commit_after># Raindrop Page Bundle

This bundle offers a simple CMS mechanism based on SonataAdminBundle + stuffs and FOSUserBundle.
We also use some proprietary bundle.
This bundle exists as an alternate approach to SonataPageBundle, in particular it is more
database oriented for long term and continuous maintenance and the administration is all
bound to a backend application (no frontend inline editing. As alternative option, preview is into roadmap).


### **INSTALLATION**:

First add the dependency to your `composer.json` file:

    "require": {
        ...
        "raindrop/page-bundle": "dev-master"
    },

Then install the bundle with the command:

    php composer.phar update

Enable the bundle in your application kernel:

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

public function registerBundles()
{
    $bundles = array(
        // ...
        new Raindrop\PageBundle\RaindropPageBundle(),
    );
}
```

Now the bundle is enabled.

### **CONFIGURATION**:

First of all update your schema:
    php app/console doctrine:schema:update --force (for development environment)
now it is up to your strategy... the production should migrate similarly or execute a query as result to following
    php app/console doctrine:schema:update --dump-sql

There is no need for yml configuration except for the fact that you maybe
want PageAdmin to show up into your dashboard:

    sonata_block:
        default_contexts: [cms]
        blocks:
            raindrop_page.block.service.template: // <---- add this line
            sonata.admin.block.admin_list:
                contexts:   [admin]

### **USAGE**:
{'fraction_non_alphanumeric': 0.08531746031746032, 'fraction_numerical': 0.0, 'mean_word_length': 3.3407134071340714, 'pattern_counts': {'":': 4, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '390007', 'n_tokens_mistral': 952, 'n_tokens_neox': 910, 'n_words': 393}