Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/68publishers/doctrine-sluggable

:abc: Doctrine Sluggable extension
https://github.com/68publishers/doctrine-sluggable

doctrine sluggable

Last synced: about 1 month ago
JSON representation

:abc: Doctrine Sluggable extension

Awesome Lists containing this project

README

        

> :warning: Warning! This package does not have active support, it exists only for the historical needs of the author.

# Doctrine Sluggable

:abc: Doctrine Sluggable extension!

Simple usage and integration into [Nette Framework](https://github.com/nette).

## Installation

The best way to install `68publishers/doctrine-sluggable` is using Composer:

```bash
$ composer require 68publishers/doctrine-sluggable
```

then register `SluggableEventSubscriber` into `EventManager` like this:

```php
getEventManager()->addEventSubscriber($subscriber);
```

but you'd better use compiler extension if you are using `Nette` Framework:

```yaml
extensions:
sluggable: SixtyEightPublishers\DoctrineSluggable\Bridge\Nette\SluggableExtension
```

## Usage

Example entity:

```php
slug) {
throw new RuntimeException('Slug is not set.');
}

return $this->slug;
}
}
```

## Options

@todo

## Contributing

Before committing any changes, don't forget to run

```bash
$ vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run
```

and

```bash
$ vendor/bin/tester ./tests
```