<commit_before># FSiAdminPositionableBundle

This bundle provides way to change position of item on the list gradually.
This mean that position will be changed by 1.

`FSiAdminPositionableBundle` works with conjunction with [Sortable behavior extension for Doctrine2](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/sortable.md)

## Usage

Add to `AppKernel.php`:

```php
new FSi\Bundle\AdminPositionableBundle\FSiAdminPositionableBundle(),
```

Add routes to `/app/config/routing.yml`:

```yml
_fsi_positionable:
    resource: "@FSiAdminPositionableBundle/Resources/config/routing.xml"
    prefix:   /
```

Sample entity:

```php
use use FSi\Bundle\AdminPositionableBundle\Model\PositionableInterface;

class Promotion implements PositionableInterface
{
    /**
     * {@inheritdoc}
     */
    public function increasePosition()
    {
        $this->position++;
    }

    /**
     * {@inheritdoc}
     */<commit_msg>Updated documentation, added declaration of position property<commit_after># FSiAdminPositionableBundle

This bundle provides way to change position of item on the list gradually.
This mean that position will be changed by 1.

`FSiAdminPositionableBundle` works with conjunction with [Sortable behavior extension for Doctrine2](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/sortable.md)

## Usage

Add to `AppKernel.php`:

```php
new FSi\Bundle\AdminPositionableBundle\FSiAdminPositionableBundle(),
```

Add routes to `/app/config/routing.yml`:

```yml
_fsi_positionable:
    resource: "@FSiAdminPositionableBundle/Resources/config/routing.xml"
    prefix:   /
```

Sample entity:

```php
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use FSi\Bundle\AdminPositionableBundle\Model\PositionableInterface;

class Promotion implements PositionableInterface
{
    /**
     * @Gedmo\SortablePosition
     * @ORM\Column(type="integer")
     */
    protected $position;

    /**
     * {@inheritdoc}
     */
    public function increasePosition()
    {
        $this->position++;
    }

    /**
     * {@inheritdoc}
     */
{'fraction_non_alphanumeric': 0.11052631578947368, 'fraction_numerical': 0.003827751196172249, 'mean_word_length': 4.0264423076923075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '273079', 'n_tokens_mistral': 639, 'n_tokens_neox': 615, 'n_words': 149}