Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vincentchalnot/sidusbasebundle

Provides various helpers to build a Symfony vendor or application
https://github.com/vincentchalnot/sidusbasebundle

Last synced: 4 days ago
JSON representation

Provides various helpers to build a Symfony vendor or application

Awesome Lists containing this project

README

        

Sidus/BaseBundle Documentation
==================================

## Service loading

If you simply inherit from the SidusBaseExtension, all the YAML files present in this directory will be loaded:
````./Resources/config/services````

````php
loadCustomConstraints([
['Regex' => ['pattern' => '/^[a-z0-9]+(?:[-\_][a-z0-9]+)*$/']],
['NotNull' => null],
]);

foreach ($constraints as $constraint) {
$violations = $validator->validate($data, $constraint);
// Do stuff with the violations
}
````

## Forms

The ````ChoiceTypeExtension```` allows choice form types to work with iterable objects. You don't need to do anything.

A new option is available for any form type: ```block_prefix``` allows you to directly choose a custom block prefix for
form rendering.

## Serializer

See [SidusBaseSerializerBundle](https://github.com/VincentChalnot/SidusBaseSerializerBundle) for additional support.