diff --git a/CHANGELOG.md b/CHANGELOG.md index 01983a1..5219149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ CRUDlex Changelog ================= -## 0.13.0 +## 0.14.0 Released: Upcoming + +## 0.13.0 +Released: 2018-02-12 - The soft deletion is now optional (but switched on by default) - Fixed content type of static files by detecting the mimetype by their name diff --git a/README.md b/README.md index d894946..ef1f94b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ CRUDlex is an easy to use, well documented and tested CRUD generator for Silex. ## Documentation -- [Documentation 0.13.0](http://philiplb.github.io/CRUDlex/docs/html/0.13.0/) (upcoming) +- [Documentation 0.13.0](http://philiplb.github.io/CRUDlex/docs/html/0.14.0/) (upcoming) +- [Documentation 0.13.0](http://philiplb.github.io/CRUDlex/docs/html/0.13.0/) - [Documentation 0.12.0](http://philiplb.github.io/CRUDlex/docs/html/0.12.0/) - [Documentation 0.11.0](http://philiplb.github.io/CRUDlex/docs/html/0.11.0/) - [Documentation 0.10.0](http://philiplb.github.io/CRUDlex/docs/html/0.10.0/) @@ -53,7 +54,7 @@ care about notes in the changelog when upgrading. ```json "require": { - "philiplb/crudlex": "0.12.0" + "philiplb/crudlex": "0.13.0" } ``` @@ -61,7 +62,7 @@ care about notes in the changelog when upgrading. ```json "require": { - "philiplb/crudlex": "0.13.x-dev" + "philiplb/crudlex": "0.14.x-dev" } ``` diff --git a/composer.json b/composer.json index e541dbf..5aaf384 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.13.x-dev" + "dev-master": "0.14.x-dev" } } } diff --git a/docs/conf.py b/docs/conf.py index ecca65f..010412b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,9 +57,9 @@ # built documents. # # The short X.Y version. -version = u'0.12.0' +version = u'0.14.0' # The full version, including alpha/beta/rc tags. -release = u'0.12.0' +release = u'0.14.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/html/0.13.0/.buildinfo b/docs/html/0.13.0/.buildinfo index 7d88fd4..23a7fa7 100644 --- a/docs/html/0.13.0/.buildinfo +++ b/docs/html/0.13.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: e69166ad9716feb667fdb65a73e9a1a6 +config: 5df8231393234aed86b264b0aaa1d6d4 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/0.13.0/_static/doctools.js b/docs/html/0.13.0/_static/doctools.js index 8163495..e2e70cc 100644 --- a/docs/html/0.13.0/_static/doctools.js +++ b/docs/html/0.13.0/_static/doctools.js @@ -124,7 +124,6 @@ var Documentation = { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); - }, /** @@ -253,29 +252,6 @@ var Documentation = { }); var url = parts.join('/'); return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); } }; @@ -284,4 +260,4 @@ _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); -}); \ No newline at end of file +}); diff --git a/docs/html/0.13.0/api/AbstractData.html b/docs/html/0.13.0/api/AbstractData.html index d47d248..b7b1c2e 100644 --- a/docs/html/0.13.0/api/AbstractData.html +++ b/docs/html/0.13.0/api/AbstractData.html @@ -8,7 +8,7 @@ - CRUDlex\AbstractData — CRUDlex 0.12.0 documentation + CRUDlex\AbstractData — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -651,7 +651,7 @@

CRUDlex\AbstractData var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/ControllerProvider.html b/docs/html/0.13.0/api/ControllerProvider.html index 7dad5b2..72197a3 100644 --- a/docs/html/0.13.0/api/ControllerProvider.html +++ b/docs/html/0.13.0/api/ControllerProvider.html @@ -8,7 +8,7 @@ - CRUDlex\ControllerProvider — CRUDlex 0.12.0 documentation + CRUDlex\ControllerProvider — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -630,7 +630,7 @@

CRUDlex\ControllerProvider var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/DataFactoryInterface.html b/docs/html/0.13.0/api/DataFactoryInterface.html index b0ef0b4..976566f 100644 --- a/docs/html/0.13.0/api/DataFactoryInterface.html +++ b/docs/html/0.13.0/api/DataFactoryInterface.html @@ -8,7 +8,7 @@ - CRUDlex\DataFactoryInterface — CRUDlex 0.12.0 documentation + CRUDlex\DataFactoryInterface — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -244,7 +244,7 @@

CRUDlex\DataFactoryInterface var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/Entity.html b/docs/html/0.13.0/api/Entity.html index 516ffe3..a089c74 100644 --- a/docs/html/0.13.0/api/Entity.html +++ b/docs/html/0.13.0/api/Entity.html @@ -8,7 +8,7 @@ - CRUDlex\Entity — CRUDlex 0.12.0 documentation + CRUDlex\Entity — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -357,7 +357,7 @@

CRUDlex\Entity var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityDefinition.html b/docs/html/0.13.0/api/EntityDefinition.html index 1ffebbe..5ea97a9 100644 --- a/docs/html/0.13.0/api/EntityDefinition.html +++ b/docs/html/0.13.0/api/EntityDefinition.html @@ -8,7 +8,7 @@ - CRUDlex\EntityDefinition — CRUDlex 0.12.0 documentation + CRUDlex\EntityDefinition — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -1082,7 +1082,7 @@

CRUDlex\EntityDefinition var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityDefinitionFactory.html b/docs/html/0.13.0/api/EntityDefinitionFactory.html index e9051eb..da16948 100644 --- a/docs/html/0.13.0/api/EntityDefinitionFactory.html +++ b/docs/html/0.13.0/api/EntityDefinitionFactory.html @@ -8,7 +8,7 @@ - CRUDlex\EntityDefinitionFactory — CRUDlex 0.12.0 documentation + CRUDlex\EntityDefinitionFactory — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -61,7 +61,7 @@
- 0.12.0 + 0.13.0
@@ -242,7 +242,7 @@

CRUDlex\EntityDefinitionFactory var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityDefinitionFactoryInterface.html b/docs/html/0.13.0/api/EntityDefinitionFactoryInterface.html index 9f925bc..cf87a5d 100644 --- a/docs/html/0.13.0/api/EntityDefinitionFactoryInterface.html +++ b/docs/html/0.13.0/api/EntityDefinitionFactoryInterface.html @@ -8,7 +8,7 @@ - CRUDlex\EntityDefinitionFactoryInterface — CRUDlex 0.12.0 documentation + CRUDlex\EntityDefinitionFactoryInterface — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -247,7 +247,7 @@

CRUDlex\EntityDefinitionFactoryInterface var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityDefinitionValidator.html b/docs/html/0.13.0/api/EntityDefinitionValidator.html index e6966b0..1556b2d 100644 --- a/docs/html/0.13.0/api/EntityDefinitionValidator.html +++ b/docs/html/0.13.0/api/EntityDefinitionValidator.html @@ -8,7 +8,7 @@ - CRUDlex\EntityDefinitionValidator — CRUDlex 0.12.0 documentation + CRUDlex\EntityDefinitionValidator — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -61,7 +61,7 @@
- 0.12.0 + 0.13.0
@@ -237,7 +237,7 @@

CRUDlex\EntityDefinitionValidator var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityDefinitionValidatorInterface.html b/docs/html/0.13.0/api/EntityDefinitionValidatorInterface.html index a6b8cdc..0dcfa5e 100644 --- a/docs/html/0.13.0/api/EntityDefinitionValidatorInterface.html +++ b/docs/html/0.13.0/api/EntityDefinitionValidatorInterface.html @@ -8,7 +8,7 @@ - CRUDlex\EntityDefinitionValidatorInterface — CRUDlex 0.12.0 documentation + CRUDlex\EntityDefinitionValidatorInterface — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -242,7 +242,7 @@

CRUDlex\EntityDefinitionValidatorInterface var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityEvents.html b/docs/html/0.13.0/api/EntityEvents.html index 38c68d2..e3f2b45 100644 --- a/docs/html/0.13.0/api/EntityEvents.html +++ b/docs/html/0.13.0/api/EntityEvents.html @@ -8,7 +8,7 @@ - CRUDlex\EntityEvents — CRUDlex 0.12.0 documentation + CRUDlex\EntityEvents — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -288,7 +288,7 @@

CRUDlex\EntityEvents var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/EntityValidator.html b/docs/html/0.13.0/api/EntityValidator.html index c0e056d..aa15963 100644 --- a/docs/html/0.13.0/api/EntityValidator.html +++ b/docs/html/0.13.0/api/EntityValidator.html @@ -8,7 +8,7 @@ - CRUDlex\EntityValidator — CRUDlex 0.12.0 documentation + CRUDlex\EntityValidator — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -346,7 +346,7 @@

CRUDlex\EntityValidator var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/FileHandler.html b/docs/html/0.13.0/api/FileHandler.html index 488b411..2f3fc03 100644 --- a/docs/html/0.13.0/api/FileHandler.html +++ b/docs/html/0.13.0/api/FileHandler.html @@ -8,7 +8,7 @@ - CRUDlex\FileHandler — CRUDlex 0.12.0 documentation + CRUDlex\FileHandler — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -425,7 +425,7 @@

CRUDlex\FileHandler var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/ManyValidator.html b/docs/html/0.13.0/api/ManyValidator.html index d19eb22..050d717 100644 --- a/docs/html/0.13.0/api/ManyValidator.html +++ b/docs/html/0.13.0/api/ManyValidator.html @@ -8,7 +8,7 @@ - CRUDlex\ManyValidator — CRUDlex 0.12.0 documentation + CRUDlex\ManyValidator — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -237,7 +237,7 @@

CRUDlex\ManyValidator var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/MySQLData.html b/docs/html/0.13.0/api/MySQLData.html index 2035417..9a322a5 100644 --- a/docs/html/0.13.0/api/MySQLData.html +++ b/docs/html/0.13.0/api/MySQLData.html @@ -8,7 +8,7 @@ - CRUDlex\MySQLData — CRUDlex 0.12.0 documentation + CRUDlex\MySQLData — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -61,7 +61,7 @@
- 0.12.0 + 0.13.0
@@ -923,7 +923,7 @@

CRUDlex\MySQLData var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/MySQLDataFactory.html b/docs/html/0.13.0/api/MySQLDataFactory.html index ce3243b..7151ae7 100644 --- a/docs/html/0.13.0/api/MySQLDataFactory.html +++ b/docs/html/0.13.0/api/MySQLDataFactory.html @@ -8,7 +8,7 @@ - CRUDlex\MySQLDataFactory — CRUDlex 0.12.0 documentation + CRUDlex\MySQLDataFactory — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -61,7 +61,7 @@
- 0.12.0 + 0.13.0
@@ -269,7 +269,7 @@

CRUDlex\MySQLDataFactory var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/ReferenceValidator.html b/docs/html/0.13.0/api/ReferenceValidator.html index 61b664f..47786cc 100644 --- a/docs/html/0.13.0/api/ReferenceValidator.html +++ b/docs/html/0.13.0/api/ReferenceValidator.html @@ -8,7 +8,7 @@ - CRUDlex\ReferenceValidator — CRUDlex 0.12.0 documentation + CRUDlex\ReferenceValidator — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -237,7 +237,7 @@

CRUDlex\ReferenceValidator var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/ServiceProvider.html b/docs/html/0.13.0/api/ServiceProvider.html index 80b6ec8..c00dbc4 100644 --- a/docs/html/0.13.0/api/ServiceProvider.html +++ b/docs/html/0.13.0/api/ServiceProvider.html @@ -8,7 +8,7 @@ - CRUDlex\ServiceProvider — CRUDlex 0.12.0 documentation + CRUDlex\ServiceProvider — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -504,7 +504,7 @@

CRUDlex\ServiceProvider var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/StreamedFileResponse.html b/docs/html/0.13.0/api/StreamedFileResponse.html index baf3389..426d107 100644 --- a/docs/html/0.13.0/api/StreamedFileResponse.html +++ b/docs/html/0.13.0/api/StreamedFileResponse.html @@ -8,7 +8,7 @@ - CRUDlex\StreamedFileResponse — CRUDlex 0.12.0 documentation + CRUDlex\StreamedFileResponse — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -234,7 +234,7 @@

CRUDlex\StreamedFileResponse var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/TwigExtensions.html b/docs/html/0.13.0/api/TwigExtensions.html index e0943cb..787aa70 100644 --- a/docs/html/0.13.0/api/TwigExtensions.html +++ b/docs/html/0.13.0/api/TwigExtensions.html @@ -8,7 +8,7 @@ - CRUDlex\TwigExtensions — CRUDlex 0.12.0 documentation + CRUDlex\TwigExtensions — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -341,7 +341,7 @@

CRUDlex\TwigExtensions var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/UniqueValidator.html b/docs/html/0.13.0/api/UniqueValidator.html index 1407a46..a5031b6 100644 --- a/docs/html/0.13.0/api/UniqueValidator.html +++ b/docs/html/0.13.0/api/UniqueValidator.html @@ -8,7 +8,7 @@ - CRUDlex\UniqueValidator — CRUDlex 0.12.0 documentation + CRUDlex\UniqueValidator — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 0.12.0 + 0.13.0
@@ -284,7 +284,7 @@

CRUDlex\UniqueValidator var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/api/YamlReader.html b/docs/html/0.13.0/api/YamlReader.html index 1ff67a0..e7e70ba 100644 --- a/docs/html/0.13.0/api/YamlReader.html +++ b/docs/html/0.13.0/api/YamlReader.html @@ -8,7 +8,7 @@ - CRUDlex\YamlReader — CRUDlex 0.12.0 documentation + CRUDlex\YamlReader — CRUDlex 0.13.0 documentation @@ -30,7 +30,7 @@ - + @@ -59,7 +59,7 @@
- 0.12.0 + 0.13.0
@@ -314,7 +314,7 @@

CRUDlex\YamlReader var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', - VERSION:'0.12.0', + VERSION:'0.13.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/html/0.13.0/genindex.html b/docs/html/0.13.0/genindex.html index 8d99c7d..19f81b3 100644 --- a/docs/html/0.13.0/genindex.html +++ b/docs/html/0.13.0/genindex.html @@ -9,7 +9,7 @@ - Index — CRUDlex 0.12.0 documentation + Index — CRUDlex 0.13.0 documentation @@ -31,7 +31,7 @@ - + @@ -59,7 +59,7 @@
- 0.12.0 + 0.13.0
@@ -1456,7 +1456,7 @@

Y

@@ -58,7 +58,7 @@
- 0.12.0 + 0.13.0
@@ -201,7 +201,7 @@ + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\AbstractData

+ +
+
+class AbstractData
+

The abstract class for reading and writing data.

+
+
+constant DELETION_SUCCESS
+

Return value on successful deletion.

+
+ +
+
+constant DELETION_FAILED_STILL_REFERENCED
+

Return value on failed deletion due to existing references.

+
+ +
+
+constant DELETION_FAILED_EVENT
+

Return value on failed deletion due to a failed before delete event.

+
+ +
+
+property definition
+

protected EntityDefinition

+

Holds the entity definition.

+
+ +
+
+property filesystem
+

protected FilesystemInterface

+

Holds the filesystem.

+
+ +
+
+property events
+

protected EntityEvents

+

Holds the events.

+
+ +
+
+doDelete(Entity $entity, $deleteCascade)
+

Performs the actual deletion.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the id of the entry to delete
  • +
  • $deleteCascade (boolean) – whether to delete children and subchildren
  • +
+
Returns:

integer true on successful deletion

+
+
+ +
+
+hydrate($row)
+

Creates an Entity from the raw data array with the field name +as keys and field values as values.

+ +++ + + + + + +
Parameters:
    +
  • $row (array) – the array with the raw data
  • +
+
Returns:

Entity the entity containing the array data then

+
+
+ +
+
+enrichEntityWithMetaData($id, Entity $entity)
+

Enriches an entity with metadata: +id, version, created_at, updated_at

+ +++ + + + +
Parameters:
    +
  • $id (mixed) – the id of the entity to enrich
  • +
  • $entity (Entity) – the entity to enrich
  • +
+
+
+ +
+
+getManyFields()
+

Gets the many-to-many fields.

+ +++ + + + +
Returns:array|string[] the many-to-many fields
+
+ +
+
+getFormFields()
+

Gets all form fields including the many-to-many-ones.

+ +++ + + + +
Returns:array all form fields
+
+ +
+
+deleteChildren($id, $deleteCascade)
+

Performs the cascading children deletion.

+ +++ + + + + + +
Parameters:
    +
  • $id (integer) – the current entities id
  • +
  • $deleteCascade (boolean) – whether to delete children and sub children
  • +
+
Returns:

integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

+
+
+ +
+
+getReferenceIds($entities, $field)
+

Gets an array of reference ids for the given entities.

+ +++ + + + + + +
Parameters:
    +
  • $entities (array) – the entities to extract the ids
  • +
  • $field (string) – the reference field
  • +
+
Returns:

array the extracted ids

+
+
+ +
+
+doCreate(Entity $entity)
+

Performs the persistence of the given entity as new entry in the +datasource.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to persist
  • +
+
Returns:

boolean true on successful creation

+
+
+ +
+
+doUpdate(Entity $entity)
+

Performs the updates of an existing entry in the datasource having the +same id.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity with the new data
  • +
+
Returns:

boolean true on successful update

+
+
+ +
+
+getEvents()
+

Gets the events instance.

+ +++ + + + +
Returns:EntityEvents the events instance
+
+ +
+
+get($id)
+

Gets the entity with the given id.

+ +++ + + + + + +
Parameters:
    +
  • $id (string) – the id
  • +
+
Returns:

Entity the entity belonging to the id or null if not existant

+
+
+ +
+
+listEntries($filter =, []$filterOperators =, []$skip = null, $amount = null, $sortField = null, $sortAscending = null)
+

Gets a list of entities fullfilling the given filter or all if no +selection was given.

+ +++ + + + + + +
Parameters:
    +
  • $filter (array) – the filter all resulting entities must fulfill, the keys as field names
  • +
  • $filterOperators (array) – the operators of the filter like “=” defining the full condition of the field
  • +
  • $skip (integer|null) – if given and not null, it specifies the amount of rows to skip
  • +
  • $amount (integer|null) – if given and not null, it specifies the maximum amount of rows to retrieve
  • +
  • $sortField (string|null) – if given and not null, it specifies the field to sort the entries
  • +
  • $sortAscending (boolean|null) – if given and not null, it specifies that the sort order is ascending, descending else
  • +
+
Returns:

Entity[] the entities fulfilling the filter or all if no filter was given

+
+
+ +
+
+create(Entity $entity)
+

Persists the given entity as new entry in the datasource.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to persist
  • +
+
Returns:

boolean true on successful creation

+
+
+ +
+
+update(Entity $entity)
+

Updates an existing entry in the datasource having the same id.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity with the new data
  • +
+
Returns:

boolean true on successful update

+
+
+ +
+
+delete($entity)
+

Deletes an entry from the datasource.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to delete
  • +
+
Returns:

integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

+
+
+ +
+
+getIdToNameMap($entity, $nameField)
+

Gets ids and names of a table. Used for building up the dropdown box of +reference type fields for example.

+ +++ + + + + + +
Parameters:
    +
  • $entity (string) – the entity
  • +
  • $nameField (string) – the field defining the name of the rows
  • +
+
Returns:

array an array with the ids as key and the names as values

+
+
+ +
+
+countBy($table, $params, $paramsOperators, $excludeDeleted)
+

Retrieves the amount of entities in the datasource fulfilling the given +parameters.

+ +++ + + + + + +
Parameters:
    +
  • $table (string) – the table to count in
  • +
  • $params (array) – an array with the field names as keys and field values as values
  • +
  • $paramsOperators (array) – the operators of the parameters like “=” defining the full condition of the field
  • +
  • $excludeDeleted (boolean) – false, if soft deleted entries in the datasource should be counted, too
  • +
+
Returns:

integer the count fulfilling the given parameters

+
+
+ +
+
+hasManySet($field, $thatIds, $excludeId = null)
+

Checks whether a given set of ids is assigned to any entity exactly +like it is given (no subset, no superset).

+ +++ + + + + + +
Parameters:
    +
  • $field (string) – the many field
  • +
  • $thatIds (array) – the id set to check
  • +
  • $excludeId (string|null) – one optional own id to exclude from the check
  • +
+
Returns:

boolean true if the set of ids exists for an entity

+
+
+ +
+
+getDefinition()
+

Gets the EntityDefinition instance.

+ +++ + + + +
Returns:EntityDefinition the definition instance
+
+ +
+
+createEmpty()
+

Creates a new, empty entity instance having all fields prefilled with +null or the defined value in case of fixed fields.

+ +++ + + + +
Returns:Entity the newly created entity
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/ControllerProvider.html b/docs/html/0.14.0/api/ControllerProvider.html new file mode 100644 index 0000000..f724e7f --- /dev/null +++ b/docs/html/0.14.0/api/ControllerProvider.html @@ -0,0 +1,660 @@ + + + + + + + + + + + CRUDlex\ControllerProvider — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\ControllerProvider

+
+
+class ControllerProvider
+

This is the ControllerProvider offering all CRUD pages.

+

It offers this routes:

+

“/resource/static” serving static resources

+

“/{entity}/create” creation page of the entity

+

“/{entity}” list page of the entity

+

“/{entity}/{id}” details page of a single entity instance

+

“/{entity}/{id}/edit” edit page of a single entity instance

+

“/{entity}/{id}/delete” POST only deletion route for an entity instance

+

“/{entity}/{id}/{field}/file” renders a file field of an entity instance

+

“/{entity}/{id}/{field}/delete” POST only deletion of a file field of an entity instance

+
+
+getNotFoundPage(Application $app, $error)
+

Generates the not found page.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $error (string) – the cause of the not found error
  • +
+
Returns:

Response the rendered not found page with the status code 404

+
+
+ +
+
+modifyFilesAndSetFlashBag(Application $app, AbstractData $crudData, Entity $instance, $entity, $mode)
+

Postprocesses the entity after modification by handling the uploaded +files and setting the flash.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the current application
  • +
  • $crudData (AbstractData) – the data instance of the entity
  • +
  • $instance (Entity) – the entity
  • +
  • $entity (string) – the name of the entity
  • +
  • $mode (string) – whether to ‘edit’ or to ‘create’ the entity
  • +
+
Returns:

null|SymfonyComponentHttpFoundationRedirectResponse the HTTP response of this modification

+
+
+ +
+
+setValidationFailedFlashes(Application $app, $optimisticLocking, $mode)
+

Sets the flashes of a failed entity modification.

+ +++ + + + +
Parameters:
    +
  • $app (Application) – the current application
  • +
  • $optimisticLocking (boolean) – whether the optimistic locking failed
  • +
  • $mode (string) – the modification mode, either ‘create’ or ‘edit’
  • +
+
+
+ +
+
+modifyEntity(Application $app, AbstractData $crudData, Entity $instance, $entity, $edit)
+

Validates and saves the new or updated entity and returns the appropriate +HTTP +response.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the current application
  • +
  • $crudData (AbstractData) – the data instance of the entity
  • +
  • $instance (Entity) – the entity
  • +
  • $entity (string) – the name of the entity
  • +
  • $edit (boolean) – whether to edit (true) or to create (false) the entity
  • +
+
Returns:

Response the HTTP response of this modification

+
+
+ +
+
+getAfterDeleteRedirectParameters(Request $request, $entity, $redirectPage)
+

Gets the parameters for the redirection after deleting an entity.

+ +++ + + + + + +
Parameters:
    +
  • $request (Request) – the current request
  • +
  • $entity (string) – the entity name
  • +
  • $redirectPage (string) – reference, where the page to redirect to will be stored
  • +
+
Returns:

array<string,string> the parameters of the redirection, entity and id

+
+
+ +
+
+buildUpListFilter(Request $request, EntityDefinition $definition, $filter, $filterActive, $filterToUse, $filterOperators)
+

Builds up the parameters of the list page filters.

+ +++ + + + +
Parameters:
    +
  • $request (Request) – the current application
  • +
  • $definition (EntityDefinition) – the current entity definition
  • +
  • $filter
  • +
  • $filterActive (boolean) – reference, will be true if at least one filter is active
  • +
  • $filterToUse (array) – reference, will hold a map of fields to integers (0 or 1) which boolean filters are active
  • +
  • $filterOperators (array) – reference, will hold a map of fields to operators for AbstractData::listEntries()
  • +
+
+
+ +
+
+setupTemplates(Application $app)
+

Setups the templates.

+ +++ + + + +
Parameters:
    +
  • $app (Application) – the Application instance of the Silex application
  • +
+
+
+ +
+
+setupRoutes(Application $app)
+

Setups the routes.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Application instance of the Silex application
  • +
+
Returns:

mixed the created controller factory

+
+
+ +
+
+setupI18n(Application $app)
+

Setups i18n.

+ +++ + + + +
Parameters:
    +
  • $app (Application) – the Application instance of the Silex application
  • +
+
+
+ +
+
+connect(Application $app)
+

Implements ControllerProviderInterface::connect() connecting this +controller.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Application instance of the Silex application
  • +
+
Returns:

SilexControllerCollection this method is expected to return the used ControllerCollection instance

+
+
+ +
+
+create(Application $app, $entity)
+

The controller for the “create” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
+
Returns:

Response the HTTP response of this action

+
+
+ +
+
+showList(Request $request, Application $app, $entity)
+

The controller for the “show list” action.

+ +++ + + + + + +
Parameters:
    +
  • $request (Request) – the current request
  • +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
+
Returns:

Response the HTTP response of this action or 404 on invalid input

+
+
+ +
+
+show(Application $app, $entity, $id)
+

The controller for the “show” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
  • $id (string) – the instance id to show
  • +
+
Returns:

Response the HTTP response of this action or 404 on invalid input

+
+
+ +
+
+edit(Application $app, $entity, $id)
+

The controller for the “edit” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
  • $id (string) – the instance id to edit
  • +
+
Returns:

Response the HTTP response of this action or 404 on invalid input

+
+
+ +
+
+delete(Application $app, $entity, $id)
+

The controller for the “delete” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
  • $id (string) – the instance id to delete
  • +
+
Returns:

Response redirects to the entity list page or 404 on invalid input

+
+
+ +
+
+renderFile(Application $app, $entity, $id, $field)
+

The controller for the “render file” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
  • $id (string) – the instance id
  • +
  • $field (string) – the field of the file to render of the instance
  • +
+
Returns:

Response the rendered file

+
+
+ +
+
+deleteFile(Application $app, $entity, $id, $field)
+

The controller for the “delete file” action.

+ +++ + + + + + +
Parameters:
    +
  • $app (Application) – the Silex application
  • +
  • $entity (string) – the current entity
  • +
  • $id (string) – the instance id
  • +
  • $field (string) – the field of the file to delete of the instance
  • +
+
Returns:

Response redirects to the instance details page or 404 on invalid input

+
+
+ +
+
+staticFile(Request $request, Application $app)
+

The controller for serving static files.

+ +++ + + + + + +
Parameters:
    +
  • $request (Request) – the current request
  • +
  • $app (Application) – the Silex application
  • +
+
Returns:

Response redirects to the instance details page or 404 on invalid input

+
+
+ +
+
+setLocale(Request $request, Application $app, $locale)
+

The controller for setting the locale.

+ +++ + + + + + +
Parameters:
    +
  • $request (Request) – the current request
  • +
  • $app (Application) – the Silex application
  • +
  • $locale (string) – the new locale
  • +
+
Returns:

Response redirects to the instance details page or 404 on invalid input

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/DataFactoryInterface.html b/docs/html/0.14.0/api/DataFactoryInterface.html new file mode 100644 index 0000000..681e3f1 --- /dev/null +++ b/docs/html/0.14.0/api/DataFactoryInterface.html @@ -0,0 +1,274 @@ + + + + + + + + + + + CRUDlex\DataFactoryInterface — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\DataFactoryInterface

+ +
+
+interface DataFactoryInterface
+

An interface used by the ServiceProvider to construct +Data instances. By implementing this and handing it into the service +provider, the user can control what database (-variation) he wants to use.

+
+
+createData(EntityDefinition $definition, FilesystemInterface $filesystem)
+

Creates instances.

+ +++ + + + + + +
Parameters:
    +
  • $definition (EntityDefinition) – the definition of the entities managed by the to be created instance
  • +
  • $filesystem (FilesystemInterface) – the filesystem managing uploaded files
  • +
+
Returns:

AbstractData the newly created instance

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/Entity.html b/docs/html/0.14.0/api/Entity.html new file mode 100644 index 0000000..626d908 --- /dev/null +++ b/docs/html/0.14.0/api/Entity.html @@ -0,0 +1,387 @@ + + + + + + + + + + + CRUDlex\Entity — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\Entity

+
+
+class Entity
+

Represents a single set of data in field value pairs like the row in a +database. Depends of course on the AbstractData implementation being used. +With this objects, the data is passed arround and validated.

+
+
+property definition
+

protected EntityDefinition

+

The definition how this entity looks like.

+
+ +
+
+property entity
+

protected array

+

Holds the key value data of the entity.

+
+ +
+
+toType($value, $type)
+

Converts a given value to the given type.

+ +++ + + + + + +
Parameters:
    +
  • $value (mixed) – the value to convert
  • +
  • $type (string) – the type to convert to like ‘integer’ or ‘float’
  • +
+
Returns:

mixed the converted value

+
+
+ +
+
+__construct(EntityDefinition $definition)
+

Constructor.

+ +++ + + + +
Parameters: +
+
+ +
+
+set($field, $value)
+

Sets a field value pair of this entity.

+ +++ + + + +
Parameters:
    +
  • $field (string) – the field
  • +
  • $value (mixed) – the value
  • +
+
+
+ +
+
+getRaw($field)
+

Gets the raw value of a field no matter what type it is. +This is usefull for input validation for example.

+ +++ + + + + + +
Parameters:
    +
  • $field (string) – the field
  • +
+
Returns:

mixed null on invalid field or else the raw value

+
+
+ +
+
+get($field)
+

Gets the value of a field in its specific type.

+ +++ + + + + + +
Parameters:
    +
  • $field (string) – the field
  • +
+
Returns:

mixed null on invalid field, an integer if the definition says that the type of the field is an integer, a boolean if the field is a boolean or else the raw value

+
+
+ +
+
+getDefinition()
+

Gets the entity definition.

+ +++ + + + +
Returns:EntityDefinition the definition
+
+ +
+
+populateViaRequest(Request $request)
+

Populates the entities fields from the requests parameters.

+ +++ + + + +
Parameters:
    +
  • $request (Request) – the request to take the field data from
  • +
+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityDefinition.html b/docs/html/0.14.0/api/EntityDefinition.html new file mode 100644 index 0000000..f71b45a --- /dev/null +++ b/docs/html/0.14.0/api/EntityDefinition.html @@ -0,0 +1,1112 @@ + + + + + + + + + + + CRUDlex\EntityDefinition — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityDefinition

+
+
+class EntityDefinition
+

The class for defining a single entity.

+
+
+property table
+

protected string

+

The table where the data is stored.

+
+ +
+
+property fields
+

protected array

+

Holds all fields in the same structure as in the CRUD YAML file.

+
+ +
+
+property label
+

protected string

+

The label for the entity.

+
+ +
+
+property localeLabels
+

protected array

+

The labels of the entity in the locales.

+
+ +
+
+property children
+

protected array

+

An array with the children referencing the entity. All entries are +arrays with three referencing elements: table, fieldName, entity

+
+ +
+
+property standardFieldLabels
+

protected array

+

Labels for the fields “id”, “created_at” and “updated_at”.

+
+ +
+
+property listFields
+

protected array

+

An array containing the fields which should appear in the list view +of the entity.

+
+ +
+
+property childrenLabelFields
+

protected array

+

The fields used to display the children on the details page of an entity. +The keys are the entity names as in the CRUD YAML and the values are the +field names.

+
+ +
+
+property deleteCascade
+

protected bool

+

Whether to delete its children when an instance is deleted.

+
+ +
+
+property pageSize
+

protected int

+

The amount of items to display per page on the listview.

+
+ +
+
+property filter
+

protected array

+

The fields offering to be filtered.

+
+ +
+
+property serviceProvider
+

protected ServiceProvider

+

Holds the ServiceProvider.

+
+ +
+
+property locale
+

protected string

+

Holds the locale.

+
+ +
+
+property initialSortField
+

protected string

+

Holds the initial sort field.

+
+ +
+
+property initialSortAscending
+

protected bool

+

Holds the initial sort order.

+
+ +
+
+property hardDeletion
+

protected bool

+

Holds whether hard deletion is activated.

+
+ +
+
+property navBarGroup
+

protected string

+

Holds if the entity must be displayed grouped in the nav bar.

+
+ +
+
+property optimisticLocking
+

protected bool

+

Holds whether optimistic locking is switched on.

+
+ +
+
+getFilteredFieldNames($exclude)
+

Gets the field names exluding the given ones.

+ +++ + + + + + +
Parameters:
    +
  • $exclude (string[]) – the field names to exclude
  • +
+
Returns:

array all field names excluding the given ones

+
+
+ +
+
+checkFieldNames($reference, $fieldNames)
+

Checks whether the given field names are declared and existing.

+ +++ + + + +
Parameters:
    +
  • $reference (string) – a hint towards the source of an invalid field name
  • +
  • $fieldNames (array) – the field names to check
  • +
+
+
+ +
+
+__construct($table, $fields, $label, $localeLabels, $standardFieldLabels, ServiceProvider $serviceProvider)
+

Constructor.

+ +++ + + + +
Parameters:
    +
  • $table (string) – the table of the entity
  • +
  • $fields (array) – the field structure just like the CRUD YAML
  • +
  • $label (string) – the label of the entity
  • +
  • $localeLabels (array) – the labels of the entity in the locales
  • +
  • $standardFieldLabels (array) – labels for the fields “id”, “created_at” and “updated_at”
  • +
  • $serviceProvider (ServiceProvider) – The current service provider
  • +
+
+
+ +
+
+getFieldNames($includeMany = false)
+

Gets all field names, including the implicit ones like “id” or +“created_at”.

+ +++ + + + + + +
Parameters:
    +
  • $includeMany (boolean) – whether to include the many fields as well
  • +
+
Returns:

string[] the field names

+
+
+ +
+
+setListFields($listFields)
+

Sets the field names to be used in the listview.

+ +++ + + + +
Parameters:
    +
  • $listFields (array) – the field names to be used in the listview
  • +
+
+
+ +
+
+getListFields()
+

Gets the field names to be used in the listview. If they were not +specified, +all public field names are returned.

+ +++ + + + +
Returns:array the field names to be used in the listview
+
+ +
+
+getChildrenLabelFields()
+

Gets the fields used to display the children on the details page of an +entity. The keys are the entity names as in the CRUD YAML and the values +are the field names.

+ +++ + + + +
Returns:array the fields used to display the children on the details page
+
+ +
+
+setChildrenLabelFields($childrenLabelFields)
+

Sets the fields used to display the children on the details page of an +entity. The keys are the entity names as in the CRUD YAML and the values +are the field names.

+ +++ + + + +
Parameters:
    +
  • $childrenLabelFields (array) – the fields used to display the children on the details page
  • +
+
+
+ +
+
+isDeleteCascade()
+

Gets whether to delete its children when an instance is deleted.

+ +++ + + + +
Returns:boolean true if so
+
+ +
+
+setDeleteCascade($deleteCascade)
+

Sets whether to delete its children when an instance is deleted.

+ +++ + + + +
Parameters:
    +
  • $deleteCascade (boolean) – whether to delete its children when an instance is deleted
  • +
+
+
+ +
+
+getPageSize()
+

Gets the amount of items to display per page on the listview.

+ +++ + + + +
Returns:integer the amount of items to display per page on the listview
+
+ +
+
+setPageSize($pageSize)
+

Sets the amount of items to display per page on the listview.

+ +++ + + + +
Parameters:
    +
  • $pageSize (integer) – the amount of items to display per page on the listview
  • +
+
+
+ +
+
+getFilter()
+

Gets the fields offering a filter.

+ +++ + + + +
Returns:array the fields to filter
+
+ +
+
+setFilter($filter)
+

Sets the fields offering a filter.

+ +++ + + + +
Parameters:
    +
  • $filter (array) – the fields to filter
  • +
+
+
+ +
+
+getServiceProvider()
+

Gets the service provider.

+ +++ + + + +
Returns:ServiceProvider the service provider
+
+ +
+
+setServiceProvider(ServiceProvider $serviceProvider)
+

Sets the service provider.

+ +++ + + + +
Parameters: +
+
+ +
+
+getPublicFieldNames()
+

Gets the public field names. The internal fields “version” and +“deleted_at” are filtered.

+ +++ + + + +
Returns:array the public field names
+
+ +
+
+getEditableFieldNames()
+

Gets the field names which are editable. Not editable are fields like the +id or the created_at.

+ +++ + + + +
Returns:array the editable field names
+
+ +
+
+getReadOnlyFields()
+

Gets the read only field names like the id or the created_at.

+ +++ + + + +
Returns:string[] the read only field names
+
+ +
+
+getType($fieldName)
+

Gets the type of a field.

+ +++ + + + + + +
Parameters:
    +
  • $fieldName (string) – the field name
  • +
+
Returns:

string the type or null on invalid field name

+
+
+ +
+
+setType($fieldName, $value)
+

Sets the type of a field.

+ +++ + + + +
Parameters:
    +
  • $fieldName (string) – the field name
  • +
  • $value (string) – the new field type
  • +
+
+
+ +
+
+getFieldLabel($fieldName)
+

Gets the label of a field.

+ +++ + + + + + +
Parameters:
    +
  • $fieldName (string) – the field name
  • +
+
Returns:

string the label of the field or the field name if no label is set in the CRUD YAML

+
+
+ +
+
+setFieldLabel($fieldName, $value)
+

Gets the label of a field.

+ +++ + + + +
Parameters:
    +
  • $fieldName (string) – the field name
  • +
  • $value (string) – the new label of the field
  • +
+
+
+ +
+
+getTable()
+

Gets the table where the data is stored.

+ +++ + + + +
Returns:string the table where the data is stored
+
+ +
+
+setTable($table)
+

Sets the table where the data is stored.

+ +++ + + + +
Parameters:
    +
  • $table (string) – the new table where the data is stored
  • +
+
+
+ +
+
+getLabel()
+

Gets the label for the entity.

+ +++ + + + +
Returns:string the label for the entity
+
+ +
+
+setLabel($label)
+

Sets the label for the entity.

+ +++ + + + +
Parameters:
    +
  • $label (string) – the new label for the entity
  • +
+
+
+ +
+
+addChild($table, $fieldName, $entity)
+

Adds a child to this definition in case the other +definition has a reference to this one.

+ +++ + + + +
Parameters:
    +
  • $table (string) – the table of the referencing definition
  • +
  • $fieldName (string) – the field name of the referencing definition
  • +
  • $entity (string) – the entity of the referencing definition
  • +
+
+
+ +
+
+getChildren()
+

Gets the referencing children to this definition.

+ +++ + + + +
Returns:array an array with the children referencing the entity. All entries are arrays with three referencing elements: table, fieldName, entity
+
+ +
+
+setLocale($locale)
+

Sets the locale to be used.

+ +++ + + + +
Parameters:
    +
  • $locale (string) – the locale to be used.
  • +
+
+
+ +
+
+getLocale()
+

Gets the locale to be used.

+ +++ + + + +
Returns:null|string the locale to be used.
+
+ +
+
+setInitialSortField($initialSortField)
+

Sets the initial sort field.

+ +++ + + + +
Parameters:
    +
  • $initialSortField (string) – the new initial sort field
  • +
+
+
+ +
+
+getInitialSortField()
+

Gets the initial sort field.

+ +++ + + + +
Returns:string the initial sort field
+
+ +
+
+setInitialSortAscending($initialSortAscending)
+

Sets whether the initial sort order is ascending.

+ +++ + + + +
Parameters:
    +
  • $initialSortAscending (boolean) – the initial sort order, true if ascending
  • +
+
+
+ +
+
+isInitialSortAscending()
+

Gets whether the initial sort order is ascending.

+ +++ + + + +
Returns:boolean the initial sort order, true if ascending
+
+ +
+
+setHardDeletion($hardDeletion)
+

Sets the hard deletion state.

+ +++ + + + +
Parameters:
    +
  • $hardDeletion (boolean) – the hard deletion state
  • +
+
+
+ +
+
+isHardDeletion()
+

Gets the hard deletion state.

+ +++ + + + +
Returns:boolean the hard deletion state
+
+ +
+
+getNavBarGroup()
+

Gets the navigation bar group where the entity belongs.

+ +++ + + + +
Returns:string the navigation bar group where the entity belongs
+
+ +
+
+setNavBarGroup($navBarGroup)
+

Sets the navigation bar group where the entity belongs.

+ +++ + + + +
Parameters:
    +
  • $navBarGroup (string) – the navigation bar group where the entity belongs
  • +
+
+
+ +
+
+hasOptimisticLocking()
+

Returns whether optimistic locking via the version field is activated.

+ +++ + + + +
Returns:boolean true if optimistic locking is activated
+
+ +
+
+setOptimisticLocking($optimisticLocking)
+

Sets whether optimistic locking via the version field is activated.

+ +++ + + + +
Parameters:
    +
  • $optimisticLocking (boolean) – true if optimistic locking is activated
  • +
+
+
+ +
+
+getSubTypeField($fieldName, $subType, $key)
+

Gets a sub field of an field.

+ +++ + + + + + +
Parameters:
    +
  • $fieldName (string) – the field name of the sub type
  • +
  • $subType (string) – the sub type like “reference” or “many”
  • +
  • $key (string) – the key of the value
  • +
+
Returns:

string the value of the sub field

+
+
+ +
+
+getField($name, $key, $default = null)
+

Gets the value of a field key.

+ +++ + + + + + +
Parameters:
    +
  • $name (string) – the name of the field
  • +
  • $key (string) – the value of the key
  • +
  • $default (mixed) – the default value to return if nothing is found
  • +
+
Returns:

mixed the value of the field key or null if not existing

+
+
+ +
+
+setField($name, $key, $value)
+

Sets the value of a field key. If the field or the key in the field +don’t exist, they get created.

+ +++ + + + +
Parameters:
    +
  • $name (string) – the name of the field
  • +
  • $key (string) – the value of the key
  • +
  • $value (mixed) – the new value
  • +
+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityDefinitionFactory.html b/docs/html/0.14.0/api/EntityDefinitionFactory.html new file mode 100644 index 0000000..f201b84 --- /dev/null +++ b/docs/html/0.14.0/api/EntityDefinitionFactory.html @@ -0,0 +1,272 @@ + + + + + + + + + + + CRUDlex\EntityDefinitionFactory — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityDefinitionFactory

+
+
+class EntityDefinitionFactory
+

Default implementation of the EntiyDefinitionFactoryInterface being used if the key “crud.entitydefinitionfactory” is +not given during the registration of the ServiceProvider.

+
+
+createEntityDefinition($table, $fields, $label, $localeLabels, $standardFieldLabels, ServiceProvider $serviceProvider)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $table
  • +
  • $fields
  • +
  • $label
  • +
  • $localeLabels
  • +
  • $standardFieldLabels
  • +
  • $serviceProvider (ServiceProvider) –
  • +
+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityDefinitionFactoryInterface.html b/docs/html/0.14.0/api/EntityDefinitionFactoryInterface.html new file mode 100644 index 0000000..18d8795 --- /dev/null +++ b/docs/html/0.14.0/api/EntityDefinitionFactoryInterface.html @@ -0,0 +1,277 @@ + + + + + + + + + + + CRUDlex\EntityDefinitionFactoryInterface — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityDefinitionFactoryInterface

+ +
+
+interface EntityDefinitionFactoryInterface
+

Interface to make the creation of the EntityDefinitions flexible. To be handed into +the ServiceProvider registration via the key “crud.entitydefinitionfactory”.

+
+
+createEntityDefinition($table, $fields, $label, $localeLabels, $standardFieldLabels, ServiceProvider $serviceProvider)
+

Creates an EntityDefinition instance.

+ +++ + + + + + +
Parameters:
    +
  • $table (string) – the table of the entity
  • +
  • $fields (array) – the fieldstructure just like the CRUD YAML
  • +
  • $label (string) – the label of the entity
  • +
  • $localeLabels (array) – the labels of the entity in the locales
  • +
  • $standardFieldLabels (array) – labels for the fields “id”, “created_at” and “updated_at”
  • +
  • $serviceProvider (ServiceProvider) – The current service provider
  • +
+
Returns:

EntityDefinition the new instance

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityDefinitionValidator.html b/docs/html/0.14.0/api/EntityDefinitionValidator.html new file mode 100644 index 0000000..fede4c5 --- /dev/null +++ b/docs/html/0.14.0/api/EntityDefinitionValidator.html @@ -0,0 +1,267 @@ + + + + + + + + + + + CRUDlex\EntityDefinitionValidator — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityDefinitionValidator

+
+
+class EntityDefinitionValidator
+

An entity definition validator using the romaricdrigon/MetaYaml validator with the +given definitionSchema.yml.

+
+
+validate($data)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $data
  • +
+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityDefinitionValidatorInterface.html b/docs/html/0.14.0/api/EntityDefinitionValidatorInterface.html new file mode 100644 index 0000000..2fbc078 --- /dev/null +++ b/docs/html/0.14.0/api/EntityDefinitionValidatorInterface.html @@ -0,0 +1,272 @@ + + + + + + + + + + + CRUDlex\EntityDefinitionValidatorInterface — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityDefinitionValidatorInterface

+ +
+
+interface EntityDefinitionValidatorInterface
+

An interface for validating entity definitions.

+
+
+validate($data)
+

Validates the given entity definition data which was parsed from the +crud.yml.

+ +++ + + + + + +
Parameters:
    +
  • $data (array) – the data to validate
  • +
+
Returns:

void

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityEvents.html b/docs/html/0.14.0/api/EntityEvents.html new file mode 100644 index 0000000..744a9fa --- /dev/null +++ b/docs/html/0.14.0/api/EntityEvents.html @@ -0,0 +1,318 @@ + + + + + + + + + + + CRUDlex\EntityEvents — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityEvents

+
+
+class EntityEvents
+

Management and execution of events.

+
+
+property events
+

protected array

+

Holds the events.

+
+ +
+
+shouldExecute(Entity $entity, $moment, $action)
+

Executes the event chain of an entity.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity having the event chain to execute
  • +
  • $moment (string) – the “moment” of the event, can be either “before” or “after”
  • +
  • $action (string) – the “action” of the event, can be either “create”, “update” or “delete”
  • +
+
Returns:

boolean true on successful execution of the full chain or false if it broke at any point (and stopped the execution)

+
+
+ +
+
+push($moment, $action, Closure $function)
+

Adds an event to fire for the given parameters. The event function must +have this signature: +function (Entity $entity) +and has to return true or false. +The events are executed one after another in the added order as long as +they return “true”. The first event returning “false” will stop the +process.

+ +++ + + + +
Parameters:
    +
  • $moment (string) – the “moment” of the event, can be either “before” or “after”
  • +
  • $action (string) – the “action” of the event, can be either “create”, “update” or “delete”
  • +
  • $function (Closure) – the event function to be called if set
  • +
+
+
+ +
+
+pop($moment, $action)
+

Removes and returns the latest event for the given parameters.

+ +++ + + + + + +
Parameters:
    +
  • $moment (string) – the “moment” of the event, can be either “before” or “after”
  • +
  • $action (string) – the “action” of the event, can be either “create”, “update” or “delete”
  • +
+
Returns:

Closure|null the popped event or null if no event was available.

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/EntityValidator.html b/docs/html/0.14.0/api/EntityValidator.html new file mode 100644 index 0000000..a3d1112 --- /dev/null +++ b/docs/html/0.14.0/api/EntityValidator.html @@ -0,0 +1,376 @@ + + + + + + + + + + + CRUDlex\EntityValidator — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\EntityValidator

+
+
+class EntityValidator
+

Performs validation of the field values of the given Entity.

+
+
+property entity
+

protected Entity

+

The entity to validate.

+
+ +
+
+property definition
+

protected EntityDefinition

+

The entities definition.

+
+ +
+
+fieldTypeToRules($field, AbstractData $data, Validator $validator)
+

Builds up the validation rules for a single field according to the +entity definition type.

+ +++ + + + + + +
Parameters:
    +
  • $field (string) – the field for the rules
  • +
  • $data (AbstractData) – the data instance to use for validation
  • +
  • $validator (Validator) – the validator to use
  • +
+
Returns:

array the validation rules for the field

+
+
+ +
+
+fieldConstraintsToRules($field, AbstractData $data)
+

Builds up the validation rules for a single field according to the +entity definition constraints.

+ +++ + + + + + +
Parameters:
    +
  • $field (string) – the field for the rules
  • +
  • $data (AbstractData) – the data instance to use for validation
  • +
+
Returns:

array the validation rules for the field

+
+
+ +
+
+buildUpRules(AbstractData $data, Validator $validator)
+

Builds up the validation rules for the entity according to its +definition.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the data instance to use for validation
  • +
  • $validator (Validator) – the validator to use
  • +
+
Returns:

array the validation rules for the entity

+
+
+ +
+
+buildUpData()
+

Builds up the data to validate from the entity.

+ +++ + + + +
Returns:array a map field to raw value
+
+ +
+
+__construct(Entity $entity)
+

Constructor.

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) – the entity to validate
  • +
+
+
+ +
+
+validate(AbstractData $data, $expectedVersion)
+

Validates the entity against the definition.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the data access instance used for counting things
  • +
  • $expectedVersion (integer) – the version to perform the optimistic locking check on
  • +
+
Returns:

array an array with the fields “valid” and “errors”; valid provides a quick check whether the given entity passes the validation and errors is an array with all errored fields as keys and arrays as values; this field arrays contains the actual errors on the field: “boolean”, “floating”, “integer”, “dateTime” (for dates and datetime fields), “inSet”, “reference”, “required”, “unique”, “value” (only for the version field, set if the optimistic locking failed).

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/FileHandler.html b/docs/html/0.14.0/api/FileHandler.html new file mode 100644 index 0000000..ed8dc27 --- /dev/null +++ b/docs/html/0.14.0/api/FileHandler.html @@ -0,0 +1,455 @@ + + + + + + + + + + + CRUDlex\FileHandler — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\FileHandler

+
+
+class FileHandler
+

Handles the files.

+
+
+property filesystem
+

protected FilesystemInterface

+

Brings the abstract access to the filesystem.

+
+ +
+
+property entityDefinition
+

protected EntityDefinition

+

Holds the entity definition.

+
+ +
+
+getPath($entityName, Entity $entity, $field)
+

Constructs a file system path for the given parameters for storing the +file of the file field.

+ +++ + + + + + +
Parameters:
    +
  • $entityName (string) – the entity name
  • +
  • $entity (Entity) – the entity
  • +
  • $field (string) – the file field in the entity
  • +
+
Returns:

string the constructed path for storing the file of the file field

+
+
+ +
+
+performOnFiles(Entity $entity, $entityName, $function)
+

Executes a function for each file field of this entity.

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) – the just created entity
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
  • $function (Closure) – the function to perform, takes $entity, $entityName and $field as parameter
  • +
+
+
+ +
+
+shouldWriteFile(AbstractData $data, Request $request, Entity $entity, $entityName, $action)
+

Writes the uploaded files.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the AbstractData instance who should receive the events
  • +
  • $request (Request) – the HTTP request containing the file data
  • +
  • $entity (Entity) – the just manipulated entity
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
  • $action (string) – the name of the performed action
  • +
+
Returns:

boolean true if all before events passed

+
+
+ +
+
+__construct(FilesystemInterface $filesystem, EntityDefinition $entityDefinition)
+

FileHandler constructor.

+ +++ + + + +
Parameters:
    +
  • $filesystem (FilesystemInterface) – the filesystem to use
  • +
  • $entityDefinition (EntityDefinition) –
  • +
+
+
+ +
+
+renderFile(Entity $entity, $entityName, $field)
+

Renders (outputs) a file of an entity. This includes setting headers +like the file size, mimetype and name, too.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to render the file from
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
  • $field (string) – the field of the entity containing the file to be rendered
  • +
+
Returns:

StreamedResponse the HTTP streamed response

+
+
+ +
+
+deleteFiles(AbstractData $data, Entity $entity, $entityName)
+

Deletes all files of an existing entity.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the AbstractData instance who should receive the events
  • +
  • $entity (Entity) – the entity to delete the files from
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
+
Returns:

boolean true on successful deletion

+
+
+ +
+
+deleteFile(AbstractData $data, Entity $entity, $entityName, $field)
+

Deletes a specific file from an existing entity.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the AbstractData instance who should receive the events
  • +
  • $entity (Entity) – the entity to delete the file from
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
  • $field (string) – the field of the entity containing the file to be deleted
  • +
+
Returns:

bool true on successful deletion true on successful deletion

+
+
+ +
+
+createFiles(AbstractData $data, Request $request, Entity $entity, $entityName)
+

Creates the uploaded files of a newly created entity.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the AbstractData instance who should receive the events
  • +
  • $request (Request) – the HTTP request containing the file data
  • +
  • $entity (Entity) – the just created entity
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
+
Returns:

boolean true if all before events passed

+
+
+ +
+
+updateFiles(AbstractData $data, Request $request, Entity $entity, $entityName)
+

Updates the uploaded files of an updated entity.

+ +++ + + + + + +
Parameters:
    +
  • $data (AbstractData) – the AbstractData instance who should receive the events
  • +
  • $request (Request) – the HTTP request containing the file data
  • +
  • $entity (Entity) – the updated entity
  • +
  • $entityName (string) – the name of the entity as this class here is not aware of it
  • +
+
Returns:

boolean true on successful update

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/ManyValidator.html b/docs/html/0.14.0/api/ManyValidator.html new file mode 100644 index 0000000..b68eb01 --- /dev/null +++ b/docs/html/0.14.0/api/ManyValidator.html @@ -0,0 +1,267 @@ + + + + + + + + + + + CRUDlex\ManyValidator — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\ManyValidator

+
+
+class ManyValidator
+

A validator to check many.

+
+
+isValid($value, $parameters)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $value
  • +
  • $parameters
  • +
+
+
+ +
+
+getInvalidDetails()
+

{@inheritdoc}

+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/MySQLData.html b/docs/html/0.14.0/api/MySQLData.html new file mode 100644 index 0000000..c3b9a63 --- /dev/null +++ b/docs/html/0.14.0/api/MySQLData.html @@ -0,0 +1,953 @@ + + + + + + + + + + + CRUDlex\MySQLData — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\MySQLData

+
+
+class MySQLData
+

MySQL Data implementation using a given Doctrine DBAL instance.

+
+
+constant DELETION_SUCCESS
+

Return value on successful deletion.

+
+ +
+
+constant DELETION_FAILED_STILL_REFERENCED
+

Return value on failed deletion due to existing references.

+
+ +
+
+constant DELETION_FAILED_EVENT
+

Return value on failed deletion due to a failed before delete event.

+
+ +
+
+property database
+

protected Connection

+

Holds the Doctrine DBAL instance.

+
+ +
+
+property useUUIDs
+

protected bool

+

Flag whether to use UUIDs as primary key.

+
+ +
+
+property definition
+

protected EntityDefinition

+

Holds the entity definition.

+
+ +
+
+property filesystem
+

protected FilesystemInterface

+

Holds the filesystem.

+
+ +
+
+property events
+

protected EntityEvents

+

Holds the events.

+
+ +
+
+addSoftDeletionToQuery(EntityDefinition $definition, QueryBuilder $queryBuilder, $fieldPrefix = '', $method = 'andWhere')
+

Adds the soft deletion parameters if activated.

+ +++ + + + +
Parameters:
    +
  • $definition (EntityDefinition) – the entity definition which might have soft deletion activated
  • +
  • $queryBuilder (QueryBuilder) – the query builder to add the deletion condition to
  • +
  • $fieldPrefix (string) – the prefix to add before the deleted_at field like an table alias
  • +
  • $method (string) – the method to use of the query builder, “where” or “andWhere”
  • +
+
+
+ +
+
+setValuesAndParameters(Entity $entity, QueryBuilder $queryBuilder, $setMethod)
+

Sets the values and parameters of the upcoming given query according +to the entity.

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) – the entity with its fields and values
  • +
  • $queryBuilder (QueryBuilder) – the upcoming query
  • +
  • $setMethod (string) – what method to use on the QueryBuilder: ‘setValue’ or ‘set’
  • +
+
+
+ +
+
+hasChildren($id)
+

Checks whether the by id given entity still has children referencing it.

+ +++ + + + + + +
Parameters:
    +
  • $id (integer) – the current entities id
  • +
+
Returns:

boolean true if the entity still has children

+
+
+ +
+
+deleteManyToManyReferences(Entity $entity)
+

Deletes any many to many references pointing to the given entity.

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) – the referenced entity
  • +
+
+
+ +
+
+doDelete(Entity $entity, $deleteCascade)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) –
  • +
  • $deleteCascade
  • +
+
+
+ +
+
+getManyIds($fields, $params)
+

Gets all possible many-to-many ids existing for this definition.

+ +++ + + + + + +
Parameters:
    +
  • $fields (array) – the many field names to fetch for
  • +
  • $params
  • +
+
Returns:

array an array of this many-to-many ids

+
+
+ +
+
+addFilter(QueryBuilder $queryBuilder, $filter, $filterOperators)
+

Adds sorting parameters to the query.

+ +++ + + + +
Parameters:
    +
  • $queryBuilder (QueryBuilder) – the query
  • +
  • $filter
  • +
  • $filterOperators
  • +
+
+
+ +
+
+addPagination(QueryBuilder $queryBuilder, $skip, $amount)
+

Adds pagination parameters to the query.

+ +++ + + + +
Parameters:
    +
  • $queryBuilder (QueryBuilder) – the query
  • +
  • $skip (integer|null) – the rows to skip
  • +
  • $amount (integer|null) – the maximum amount of rows
  • +
+
+
+ +
+
+addSort(QueryBuilder $queryBuilder, $sortField, $sortAscending)
+

Adds sorting parameters to the query.

+ +++ + + + +
Parameters:
    +
  • $queryBuilder (QueryBuilder) – the query
  • +
  • $sortField (string|null) – the sort field
  • +
  • $sortAscending (boolean|null) – true if sort ascending, false if descending
  • +
+
+
+ +
+
+fetchReferencesForField($entities, $field)
+

Adds the id and name of referenced entities to the given entities. The +reference field is before the raw id of the referenced entity and after +the fetch, it’s an array with the keys id and name.

+ +++ + + + +
Parameters:
    +
  • $entities
  • +
  • $field (string) – the reference field
  • +
+
+
+ +
+
+generateUUID()
+

Generates a new UUID.

+ +++ + + + +
Returns:string|null the new UUID or null if this instance isn’t configured to do so
+
+ +
+
+enrichWithManyField($idToData, $manyField)
+

Enriches the given mapping of entity id to raw entity data with some +many-to-many data.

+ +++ + + + +
Parameters:
    +
  • $idToData (array) – a reference to the map entity id to raw entity data
  • +
  • $manyField
  • +
+
+
+ +
+
+enrichWithMany($rows)
+

Fetches to the rows belonging many-to-many entries and adds them to the +rows.

+ +++ + + + + + +
Parameters:
    +
  • $rows (array) – the rows to enrich
  • +
+
Returns:

array the enriched rows

+
+
+ +
+
+saveMany(Entity $entity)
+

First, deletes all to the given entity related many-to-many entries from +the DB +and then writes them again.

+ +++ + + + +
Parameters:
    +
  • $entity (Entity) – the entity to save the many-to-many entries of
  • +
+
+
+ +
+
+enrichWithReference($entities)
+

Adds the id and name of referenced entities to the given entities. Each +reference field is before the raw id of the referenced entity and after +the fetch, it’s an array with the keys id and name.

+ +++ + + + + + +
Parameters:
    +
  • $entities
  • +
+
Returns:

void

+
+
+ +
+
+doCreate(Entity $entity)
+

{@inheritdoc}

+ +++ + + + +
Parameters: +
+
+ +
+
+doUpdate(Entity $entity)
+

{@inheritdoc}

+ +++ + + + +
Parameters: +
+
+ +
+
+__construct(EntityDefinition $definition, FilesystemInterface $filesystem, Connection $database, $useUUIDs)
+

Constructor.

+ +++ + + + +
Parameters:
    +
  • $definition (EntityDefinition) – the entity definition
  • +
  • $filesystem (FilesystemInterface) – the filesystem to use
  • +
  • $database (Connection) – the Doctrine DBAL instance to use
  • +
  • $useUUIDs (boolean) – flag whether to use UUIDs as primary key
  • +
+
+
+ +
+
+get($id)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $id
  • +
+
+
+ +
+
+listEntries($filter =, []$filterOperators =, []$skip = null, $amount = null, $sortField = null, $sortAscending = null)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $filter
  • +
  • $filterOperators
  • +
  • $skip
  • +
  • $amount
  • +
  • $sortField
  • +
  • $sortAscending
  • +
+
+
+ +
+
+getIdToNameMap($entity, $nameField)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $entity
  • +
  • $nameField
  • +
+
+
+ +
+
+countBy($table, $params, $paramsOperators, $excludeDeleted)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $table
  • +
  • $params
  • +
  • $paramsOperators
  • +
  • $excludeDeleted
  • +
+
+
+ +
+
+hasManySet($field, $thatIds, $excludeId = null)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $field
  • +
  • $thatIds
  • +
  • $excludeId
  • +
+
+
+ +
+
+hydrate($row)
+

Creates an Entity from the raw data array with the field name +as keys and field values as values.

+ +++ + + + + + +
Parameters:
    +
  • $row (array) – the array with the raw data
  • +
+
Returns:

Entity the entity containing the array data then

+
+
+ +
+
+enrichEntityWithMetaData($id, Entity $entity)
+

Enriches an entity with metadata: +id, version, created_at, updated_at

+ +++ + + + +
Parameters:
    +
  • $id (mixed) – the id of the entity to enrich
  • +
  • $entity (Entity) – the entity to enrich
  • +
+
+
+ +
+
+getManyFields()
+

Gets the many-to-many fields.

+ +++ + + + +
Returns:array|string[] the many-to-many fields
+
+ +
+
+getFormFields()
+

Gets all form fields including the many-to-many-ones.

+ +++ + + + +
Returns:array all form fields
+
+ +
+
+deleteChildren($id, $deleteCascade)
+

Performs the cascading children deletion.

+ +++ + + + + + +
Parameters:
    +
  • $id (integer) – the current entities id
  • +
  • $deleteCascade (boolean) – whether to delete children and sub children
  • +
+
Returns:

integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

+
+
+ +
+
+getReferenceIds($entities, $field)
+

Gets an array of reference ids for the given entities.

+ +++ + + + + + +
Parameters:
    +
  • $entities (array) – the entities to extract the ids
  • +
  • $field (string) – the reference field
  • +
+
Returns:

array the extracted ids

+
+
+ +
+
+getEvents()
+

Gets the events instance.

+ +++ + + + +
Returns:EntityEvents the events instance
+
+ +
+
+create(Entity $entity)
+

Persists the given entity as new entry in the datasource.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to persist
  • +
+
Returns:

boolean true on successful creation

+
+
+ +
+
+update(Entity $entity)
+

Updates an existing entry in the datasource having the same id.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity with the new data
  • +
+
Returns:

boolean true on successful update

+
+
+ +
+
+delete($entity)
+

Deletes an entry from the datasource.

+ +++ + + + + + +
Parameters:
    +
  • $entity (Entity) – the entity to delete
  • +
+
Returns:

integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

+
+
+ +
+
+getDefinition()
+

Gets the EntityDefinition instance.

+ +++ + + + +
Returns:EntityDefinition the definition instance
+
+ +
+
+createEmpty()
+

Creates a new, empty entity instance having all fields prefilled with +null or the defined value in case of fixed fields.

+ +++ + + + +
Returns:Entity the newly created entity
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/MySQLDataFactory.html b/docs/html/0.14.0/api/MySQLDataFactory.html new file mode 100644 index 0000000..3c28c84 --- /dev/null +++ b/docs/html/0.14.0/api/MySQLDataFactory.html @@ -0,0 +1,299 @@ + + + + + + + + + + + CRUDlex\MySQLDataFactory — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\MySQLDataFactory

+
+
+class MySQLDataFactory
+

A factory implementation for MySQLData instances.

+
+
+property database
+

protected Connection

+

Holds the Doctrine DBAL instance.

+
+ +
+
+property useUUIDs
+

protected bool

+

Flag whether to use UUIDs as primary key.

+
+ +
+
+__construct(Connection $database, $useUUIDs = false)
+

Constructor.

+ +++ + + + +
Parameters:
    +
  • $database (Connection) –
  • +
  • $useUUIDs
  • +
+
+
+ +
+
+createData(EntityDefinition $definition, FilesystemInterface $filesystem)
+

{@inheritdoc}

+ +++ + + + +
Parameters: +
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/ReferenceValidator.html b/docs/html/0.14.0/api/ReferenceValidator.html new file mode 100644 index 0000000..ec4d75e --- /dev/null +++ b/docs/html/0.14.0/api/ReferenceValidator.html @@ -0,0 +1,267 @@ + + + + + + + + + + + CRUDlex\ReferenceValidator — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\ReferenceValidator

+
+
+class ReferenceValidator
+

A validator to check references.

+
+
+isValid($value, $parameters)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $value
  • +
  • $parameters
  • +
+
+
+ +
+
+getInvalidDetails()
+

{@inheritdoc}

+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/ServiceProvider.html b/docs/html/0.14.0/api/ServiceProvider.html new file mode 100644 index 0000000..e0739fa --- /dev/null +++ b/docs/html/0.14.0/api/ServiceProvider.html @@ -0,0 +1,534 @@ + + + + + + + + + + + CRUDlex\ServiceProvider — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\ServiceProvider

+
+
+class ServiceProvider
+

The ServiceProvider setups and initializes the whole CRUD system. +After adding it to your Silex-setup, it offers access to AbstractData +instances, one for each defined entity off the CRUD YAML file.

+
+
+property datas
+

protected array

+

Holds the data instances.

+
+ +
+
+initMissingServiceProviders(Container $app)
+

Initializes needed but yet missing service providers.

+ +++ + + + +
Parameters:
    +
  • $app (Container) – the application container
  • +
+
+
+ +
+
+initLocales(Container $app)
+

Initializes the available locales.

+ +++ + + + + + +
Parameters:
    +
  • $app (Container) – the application container
  • +
+
Returns:

array the available locales

+
+
+ +
+
+initChildren()
+

Initializes the children of the data entries.

+
+ +
+
+getLocaleLabels($locales, $crud)
+

Gets a map with localized entity labels from the CRUD YML.

+ +++ + + + + + +
Parameters:
    +
  • $locales (array) – the available locales
  • +
  • $crud (array) – the CRUD entity map
  • +
+
Returns:

array the map with localized entity labels

+
+
+ +
+
+configureDefinition(EntityDefinition $definition, $crud)
+

Configures the EntityDefinition according to the given +CRUD entity map.

+ +++ + + + +
Parameters:
    +
  • $definition (EntityDefinition) – the definition to configure
  • +
  • $crud (array) – the CRUD entity map
  • +
+
+
+ +
+
+createDefinition(Container $app, $locales, $crud, $name)
+

Creates and setups an EntityDefinition instance.

+ +++ + + + + + +
Parameters:
    +
  • $app (Container) – the application container
  • +
  • $locales (array) – the available locales
  • +
  • $crud (array) – the parsed YAML of a CRUD entity
  • +
  • $name (string) – the name of the entity
  • +
+
Returns:

EntityDefinition the EntityDefinition good to go

+
+
+ +
+
+validateEntityDefinition(Container $app, $entityDefinition)
+

Validates the parsed entity definition.

+ +++ + + + +
Parameters:
    +
  • $app (Container) – the application container
  • +
  • $entityDefinition (array) – the entity definition to validate
  • +
+
+
+ +
+
+init($crudFileCachingDirectory, Container $app)
+

Initializes the instance.

+ +++ + + + +
Parameters:
    +
  • $crudFileCachingDirectory (string|null) – the writable directory to store the CRUD YAML file cache
  • +
  • $app (Container) – the application container
  • +
+
+
+ +
+
+register(Container $app)
+

Implements ServiceProviderInterface::register() registering $app[‘crud’]. +$app[‘crud’] contains an instance of the ServiceProvider afterwards.

+ +++ + + + +
Parameters:
    +
  • $app (Container) – the Container instance of the Silex application
  • +
+
+
+ +
+
+boot(Application $app)
+

Initializes the crud service right after boot.

+ +++ + + + +
Parameters:
    +
  • $app (Application) – the Container instance of the Silex application
  • +
+
+
+ +
+
+getData($name)
+

Getter for the AbstractData instances.

+ +++ + + + + + +
Parameters:
    +
  • $name (string) – the entity name of the desired Data instance
  • +
+
Returns:

AbstractData the AbstractData instance or null on invalid name

+
+
+ +
+
+getEntities()
+

Getter for all available entity names.

+ +++ + + + +
Returns:string[] a list of all available entity names
+
+ +
+
+getEntitiesNavBar()
+

Getter for the entities for the navigation bar.

+ +++ + + + +
Returns:string[] a list of all available entity names with their group
+
+ +
+
+getTemplate(Container $app, $section, $action, $entity)
+

Determines the Twig template to use for the given parameters depending on +the existance of certain keys in the Container $app in this order:

+

crud.$section.$action.$entity crud.$section.$action crud.$section

+

If nothing exists, this string is returned: “@crud/<action>.twig”

+ +++ + + + + + +
Parameters:
    +
  • $app (Container) – the Silex application
  • +
  • $section (string) – the section of the template, either “layout” or “template”
  • +
  • $action (string) – the current calling action like “create” or “show”
  • +
  • $entity (string) – the current calling entity
  • +
+
Returns:

string the best fitting template

+
+
+ +
+
+setLocale($locale)
+

Sets the locale to be used.

+ +++ + + + +
Parameters:
    +
  • $locale (string) – the locale to be used.
  • +
+
+
+ +
+
+getLocales()
+

Gets the available locales.

+ +++ + + + +
Returns:array the available locales
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/StreamedFileResponse.html b/docs/html/0.14.0/api/StreamedFileResponse.html new file mode 100644 index 0000000..de1f4eb --- /dev/null +++ b/docs/html/0.14.0/api/StreamedFileResponse.html @@ -0,0 +1,264 @@ + + + + + + + + + + + CRUDlex\StreamedFileResponse — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\StreamedFileResponse

+
+
+class StreamedFileResponse
+

Small utility class to generate functions for streamed responses returning +a file.

+
+
+getStreamedFileFunction($file)
+

Generates a lambda which is streaming the given file to standard output.

+ +++ + + + + + +
Parameters:
    +
  • $file (string) – the filename to stream
  • +
+
Returns:

Closure the generated lambda

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/TwigExtensions.html b/docs/html/0.14.0/api/TwigExtensions.html new file mode 100644 index 0000000..1da90a8 --- /dev/null +++ b/docs/html/0.14.0/api/TwigExtensions.html @@ -0,0 +1,371 @@ + + + + + + + + + + + CRUDlex\TwigExtensions — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\TwigExtensions

+
+
+class TwigExtensions
+

Provides and setups the Twig extensions like filters.

+
+
+formatTime($value, $timezone, $pattern)
+

Formats the given time value to a timestring defined by the $pattern +parameter.

+

If the value is false (like null), an empty string is returned. Else, the +value is tried to be parsed as datetime via the given pattern. If that +fails, it is tried to be parsed with the pattern +‘Y-m-d H:i:s’. If that fails, the value is returned unchanged. Else, it is +returned formatted with the given pattern. The effect is to shorten +‘Y-m-d H:i:s’ to ‘Y-m-d’ for example.

+ +++ + + + + + +
Parameters:
    +
  • $value (string) – the value to be formatted
  • +
  • $timezone (string) – the timezone of the value
  • +
  • $pattern (string) – the pattern with which the value is parsed and formatted
  • +
+
Returns:

string the formatted value

+
+
+ +
+
+registerTwigExtensions(Container $app)
+

Registers all extensions.

+ +++ + + + +
Parameters:
    +
  • $app (Container) – the current application
  • +
+
+
+ +
+
+getLanguageName($language)
+

Gets a language name in the given language.

+ +++ + + + + + +
Parameters:
    +
  • $language (string) – the language code of the desired language name
  • +
+
Returns:

string the language name in the given language or null if not available

+
+
+ +
+
+formatFloat($float)
+

Formats a float to not display in scientific notation.

+ +++ + + + + + +
Parameters:
    +
  • $float (float) – the float to format
  • +
+
Returns:

double|string the formated float

+
+
+ +
+
+formatDate($value, $isUTC)
+

Formats the given value to a date of the format ‘Y-m-d’.

+ +++ + + + + + +
Parameters:
    +
  • $value (string) – the value, might be of the format ‘Y-m-d H:i’ or ‘Y-m-d’
  • +
  • $isUTC (boolean) – whether the given value is in UTC
  • +
+
Returns:

string the formatted result or an empty string on null value

+
+
+ +
+
+formatDateTime($value, $isUTC)
+

Formats the given value to a date of the format ‘Y-m-d H:i’.

+ +++ + + + + + +
Parameters:
    +
  • $value (string) – the value, might be of the format ‘Y-m-d H:i’
  • +
  • $isUTC (boolean) – whether the given value is in UTC
  • +
+
Returns:

string the formatted result or an empty string on null value

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/UniqueValidator.html b/docs/html/0.14.0/api/UniqueValidator.html new file mode 100644 index 0000000..31e43d1 --- /dev/null +++ b/docs/html/0.14.0/api/UniqueValidator.html @@ -0,0 +1,314 @@ + + + + + + + + + + + CRUDlex\UniqueValidator — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\UniqueValidator

+
+
+class UniqueValidator
+

A validator to check for an unique field.

+
+
+isValidUniqueMany($value, AbstractData $data, Entity $entity, $field)
+

Checks whether the unique constraint is valid for a many-to-many field.

+ +++ + + + + + +
Parameters:
    +
  • $value (array) – the value to check
  • +
  • $data (AbstractData) – the data to perform the check with
  • +
  • $entity (Entity) – the entity to perform the check on
  • +
  • $field
  • +
+
Returns:

boolean true if it is a valid unique many-to-many constraint

+
+
+ +
+
+isValidUnique($value, AbstractData $data, Entity $entity, $field, $type)
+

Performs the regular unique validation.

+ +++ + + + + + +
Parameters: +
Returns:

boolean true if everything is valid

+
+
+ +
+
+isValid($value, $parameters)
+

{@inheritdoc}

+ +++ + + + +
Parameters:
    +
  • $value
  • +
  • $parameters
  • +
+
+
+ +
+
+getInvalidDetails()
+

{@inheritdoc}

+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/api/YamlReader.html b/docs/html/0.14.0/api/YamlReader.html new file mode 100644 index 0000000..6db0da6 --- /dev/null +++ b/docs/html/0.14.0/api/YamlReader.html @@ -0,0 +1,344 @@ + + + + + + + + + + + CRUDlex\YamlReader — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUDlex\YamlReader

+
+
+class YamlReader
+

Reads Yaml files and caches them if a writable path is given. The cache is used first on the next read. +It is a simple PHP class internally.

+
+
+property cachePath
+

protected string

+

The path for the cache files.

+
+ +
+
+getCacheFile($fileName)
+

Gets an absolute path for a cache file.

+ +++ + + + + + +
Parameters:
    +
  • $fileName (string) – the file to cache
  • +
+
Returns:

string the absolute path of the cache file

+
+
+ +
+
+readFromCache($fileName)
+

Reads the content of the cached file if it exists.

+ +++ + + + + + +
Parameters:
    +
  • $fileName (string) – the cache file to read from
  • +
+
Returns:

null|array the cached data structure or null if the cache file was not available

+
+
+ +
+
+writeToCache($fileName, $content)
+

Writes the given content to a cached PHP file.

+ +++ + + + +
Parameters:
    +
  • $fileName (string) – the original filename
  • +
  • $content (array) – the content to cache
  • +
+
+
+ +
+
+__construct($cachePath)
+

YamlReader constructor.

+ +++ + + + +
Parameters:
    +
  • $cachePath (string|null) – if given, the path for the cache files which should be a writable directory
  • +
+
+
+ +
+
+read($fileName)
+

Reads and returns the contents of the given Yaml file. If +it goes wrong, it throws an exception.

+ +++ + + + + + +
Parameters:
    +
  • $fileName (string) – the file to read
  • +
+
Returns:

array the file contents

+
+
+ +
+ +
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/genindex.html b/docs/html/0.14.0/genindex.html new file mode 100644 index 0000000..dc06ae2 --- /dev/null +++ b/docs/html/0.14.0/genindex.html @@ -0,0 +1,1486 @@ + + + + + + + + + + + + Index — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+
    +
  • Docs »
  • + +
  • +
  • + + + +
  • +
+
+
+
+
+ + +

Index

+ +
+ _ + | A + | B + | C + | D + | E + | F + | G + | H + | I + | L + | M + | N + | O + | P + | R + | S + | T + | U + | V + | W + | Y + +
+

_

+ + +
+ +
__construct() (Entity method) +
+ +
+ +
(EntityDefinition method) +
+ + +
(EntityValidator method) +
+ + +
(FileHandler method) +
+ + +
(MySQLData method) +
+ + +
(MySQLDataFactory method) +
+ + +
(YamlReader method) +
+ +
+
+ +

A

+ + + +
+ +
AbstractData (class) +
+ + +
AbstractData::DELETION_FAILED_EVENT (class constant) +
+ + +
AbstractData::DELETION_FAILED_STILL_REFERENCED (class constant) +
+ + +
AbstractData::DELETION_SUCCESS (class constant) +
+ + +
addChild() (EntityDefinition method) +
+ +
+ +
addFilter() (MySQLData method) +
+ + +
addPagination() (MySQLData method) +
+ + +
addSoftDeletionToQuery() (MySQLData method) +
+ + +
addSort() (MySQLData method) +
+ +
+ +

B

+ + + +
+ +
boot() (ServiceProvider method) +
+ + +
buildUpData() (EntityValidator method) +
+ +
+ +
buildUpListFilter() (ControllerProvider method) +
+ + +
buildUpRules() (EntityValidator method) +
+ +
+ +

C

+ + + +
+ +
cachePath (YamlReader property) +
+ + +
checkFieldNames() (EntityDefinition method) +
+ + +
children (EntityDefinition property) +
+ + +
childrenLabelFields (EntityDefinition property) +
+ + +
configureDefinition() (ServiceProvider method) +
+ + +
connect() (ControllerProvider method) +
+ + +
ControllerProvider (class) +
+ +
+ +
countBy() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
create() (AbstractData method) +
+ +
+ +
(ControllerProvider method) +
+ + +
(MySQLData method) +
+ +
+ +
createData() (DataFactoryInterface method) +
+ +
+ +
(MySQLDataFactory method) +
+ +
+ +
createDefinition() (ServiceProvider method) +
+ + +
createEmpty() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
createEntityDefinition() (EntityDefinitionFactory method) +
+ +
+ +
(EntityDefinitionFactoryInterface method) +
+ +
+ +
createFiles() (FileHandler method) +
+ +
+ +

D

+ + + +
+ +
database (MySQLData property) +
+ +
+ +
(MySQLDataFactory property) +
+ +
+ +
DataFactoryInterface (interface) +
+ + +
datas (ServiceProvider property) +
+ + +
definition (AbstractData property) +
+ +
+ +
(Entity property) +
+ + +
(EntityValidator property) +
+ + +
(MySQLData property) +
+ +
+ +
delete() (AbstractData method) +
+ +
+ +
(ControllerProvider method) +
+ + +
(MySQLData method) +
+ +
+ +
deleteCascade (EntityDefinition property) +
+ + +
deleteChildren() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+
+ +
deleteFile() (ControllerProvider method) +
+ +
+ +
(FileHandler method) +
+ +
+ +
deleteFiles() (FileHandler method) +
+ + +
deleteManyToManyReferences() (MySQLData method) +
+ + +
doCreate() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
doDelete() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
doUpdate() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+
+ +

E

+ + + +
+ +
edit() (ControllerProvider method) +
+ + +
enrichEntityWithMetaData() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
enrichWithMany() (MySQLData method) +
+ + +
enrichWithManyField() (MySQLData method) +
+ + +
enrichWithReference() (MySQLData method) +
+ + +
Entity (class) +
+ + +
entity (Entity property) +
+ +
+ +
(EntityValidator property) +
+ +
+ +
EntityDefinition (class) +
+ +
+ +
entityDefinition (FileHandler property) +
+ + +
EntityDefinitionFactory (class) +
+ + +
EntityDefinitionFactoryInterface (interface) +
+ + +
EntityDefinitionValidator (class) +
+ + +
EntityDefinitionValidatorInterface (interface) +
+ + +
EntityEvents (class) +
+ + +
EntityValidator (class) +
+ + +
events (AbstractData property) +
+ +
+ +
(EntityEvents property) +
+ + +
(MySQLData property) +
+ +
+
+ +

F

+ + + +
+ +
fetchReferencesForField() (MySQLData method) +
+ + +
fieldConstraintsToRules() (EntityValidator method) +
+ + +
fields (EntityDefinition property) +
+ + +
fieldTypeToRules() (EntityValidator method) +
+ + +
FileHandler (class) +
+ + +
filesystem (AbstractData property) +
+ +
+ +
(FileHandler property) +
+ + +
(MySQLData property) +
+ +
+
+ +
filter (EntityDefinition property) +
+ + +
formatDate() (TwigExtensions method) +
+ + +
formatDateTime() (TwigExtensions method) +
+ + +
formatFloat() (TwigExtensions method) +
+ + +
formatTime() (TwigExtensions method) +
+ +
+ +

G

+ + + +
+ +
generateUUID() (MySQLData method) +
+ + +
get() (AbstractData method) +
+ +
+ +
(Entity method) +
+ + +
(MySQLData method) +
+ +
+ +
getAfterDeleteRedirectParameters() (ControllerProvider method) +
+ + +
getCacheFile() (YamlReader method) +
+ + +
getChildren() (EntityDefinition method) +
+ + +
getChildrenLabelFields() (EntityDefinition method) +
+ + +
getData() (ServiceProvider method) +
+ + +
getDefinition() (AbstractData method) +
+ +
+ +
(Entity method) +
+ + +
(MySQLData method) +
+ +
+ +
getEditableFieldNames() (EntityDefinition method) +
+ + +
getEntities() (ServiceProvider method) +
+ + +
getEntitiesNavBar() (ServiceProvider method) +
+ + +
getEvents() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
getField() (EntityDefinition method) +
+ + +
getFieldLabel() (EntityDefinition method) +
+ + +
getFieldNames() (EntityDefinition method) +
+ + +
getFilter() (EntityDefinition method) +
+ + +
getFilteredFieldNames() (EntityDefinition method) +
+ + +
getFormFields() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
getIdToNameMap() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
getInitialSortField() (EntityDefinition method) +
+ + +
getInvalidDetails() (ManyValidator method) +
+ +
+ +
(ReferenceValidator method) +
+ + +
(UniqueValidator method) +
+ +
+ +
getLabel() (EntityDefinition method) +
+ +
+ +
getLanguageName() (TwigExtensions method) +
+ + +
getListFields() (EntityDefinition method) +
+ + +
getLocale() (EntityDefinition method) +
+ + +
getLocaleLabels() (ServiceProvider method) +
+ + +
getLocales() (ServiceProvider method) +
+ + +
getManyFields() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
getManyIds() (MySQLData method) +
+ + +
getNavBarGroup() (EntityDefinition method) +
+ + +
getNotFoundPage() (ControllerProvider method) +
+ + +
getPageSize() (EntityDefinition method) +
+ + +
getPath() (FileHandler method) +
+ + +
getPublicFieldNames() (EntityDefinition method) +
+ + +
getRaw() (Entity method) +
+ + +
getReadOnlyFields() (EntityDefinition method) +
+ + +
getReferenceIds() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
getServiceProvider() (EntityDefinition method) +
+ + +
getStreamedFileFunction() (StreamedFileResponse method) +
+ + +
getSubTypeField() (EntityDefinition method) +
+ + +
getTable() (EntityDefinition method) +
+ + +
getTemplate() (ServiceProvider method) +
+ + +
getType() (EntityDefinition method) +
+ +
+ +

H

+ + + +
+ +
hardDeletion (EntityDefinition property) +
+ + +
hasChildren() (MySQLData method) +
+ + +
hasManySet() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+
+ +
hasOptimisticLocking() (EntityDefinition method) +
+ + +
hydrate() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+
+ +

I

+ + + +
+ +
init() (ServiceProvider method) +
+ + +
initChildren() (ServiceProvider method) +
+ + +
initialSortAscending (EntityDefinition property) +
+ + +
initialSortField (EntityDefinition property) +
+ + +
initLocales() (ServiceProvider method) +
+ + +
initMissingServiceProviders() (ServiceProvider method) +
+ +
+ +
isDeleteCascade() (EntityDefinition method) +
+ + +
isHardDeletion() (EntityDefinition method) +
+ + +
isInitialSortAscending() (EntityDefinition method) +
+ + +
isValid() (ManyValidator method) +
+ +
+ +
(ReferenceValidator method) +
+ + +
(UniqueValidator method) +
+ +
+ +
isValidUnique() (UniqueValidator method) +
+ + +
isValidUniqueMany() (UniqueValidator method) +
+ +
+ +

L

+ + + +
+ +
label (EntityDefinition property) +
+ + +
listEntries() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+ +
listFields (EntityDefinition property) +
+ +
+ +
locale (EntityDefinition property) +
+ + +
localeLabels (EntityDefinition property) +
+ +
+ +

M

+ + + +
+ +
ManyValidator (class) +
+ + +
modifyEntity() (ControllerProvider method) +
+ + +
modifyFilesAndSetFlashBag() (ControllerProvider method) +
+ + +
MySQLData (class) +
+ +
+ +
MySQLData::DELETION_FAILED_EVENT (class constant) +
+ + +
MySQLData::DELETION_FAILED_STILL_REFERENCED (class constant) +
+ + +
MySQLData::DELETION_SUCCESS (class constant) +
+ + +
MySQLDataFactory (class) +
+ +
+ +

N

+ + +
+ +
navBarGroup (EntityDefinition property) +
+ +
+ +

O

+ + +
+ +
optimisticLocking (EntityDefinition property) +
+ +
+ +

P

+ + + +
+ +
pageSize (EntityDefinition property) +
+ + +
performOnFiles() (FileHandler method) +
+ + +
pop() (EntityEvents method) +
+ +
+ +
populateViaRequest() (Entity method) +
+ + +
push() (EntityEvents method) +
+ +
+ +

R

+ + + +
+ +
read() (YamlReader method) +
+ + +
readFromCache() (YamlReader method) +
+ + +
ReferenceValidator (class) +
+ +
+ +
register() (ServiceProvider method) +
+ + +
registerTwigExtensions() (TwigExtensions method) +
+ + +
renderFile() (ControllerProvider method) +
+ +
+ +
(FileHandler method) +
+ +
+
+ +

S

+ + + +
+ +
saveMany() (MySQLData method) +
+ + +
ServiceProvider (class) +
+ + +
serviceProvider (EntityDefinition property) +
+ + +
set() (Entity method) +
+ + +
setChildrenLabelFields() (EntityDefinition method) +
+ + +
setDeleteCascade() (EntityDefinition method) +
+ + +
setField() (EntityDefinition method) +
+ + +
setFieldLabel() (EntityDefinition method) +
+ + +
setFilter() (EntityDefinition method) +
+ + +
setHardDeletion() (EntityDefinition method) +
+ + +
setInitialSortAscending() (EntityDefinition method) +
+ + +
setInitialSortField() (EntityDefinition method) +
+ + +
setLabel() (EntityDefinition method) +
+ + +
setListFields() (EntityDefinition method) +
+ + +
setLocale() (ControllerProvider method) +
+ +
+ +
(EntityDefinition method) +
+ + +
(ServiceProvider method) +
+ +
+ +
setNavBarGroup() (EntityDefinition method) +
+ + +
setOptimisticLocking() (EntityDefinition method) +
+ +
+ +
setPageSize() (EntityDefinition method) +
+ + +
setServiceProvider() (EntityDefinition method) +
+ + +
setTable() (EntityDefinition method) +
+ + +
setType() (EntityDefinition method) +
+ + +
setupI18n() (ControllerProvider method) +
+ + +
setupRoutes() (ControllerProvider method) +
+ + +
setupTemplates() (ControllerProvider method) +
+ + +
setValidationFailedFlashes() (ControllerProvider method) +
+ + +
setValuesAndParameters() (MySQLData method) +
+ + +
shouldExecute() (EntityEvents method) +
+ + +
shouldWriteFile() (FileHandler method) +
+ + +
show() (ControllerProvider method) +
+ + +
showList() (ControllerProvider method) +
+ + +
standardFieldLabels (EntityDefinition property) +
+ + +
staticFile() (ControllerProvider method) +
+ + +
StreamedFileResponse (class) +
+ +
+ +

T

+ + + +
+ +
table (EntityDefinition property) +
+ + +
toType() (Entity method) +
+ +
+ +
TwigExtensions (class) +
+ +
+ +

U

+ + + +
+ +
UniqueValidator (class) +
+ + +
update() (AbstractData method) +
+ +
+ +
(MySQLData method) +
+ +
+
+ +
updateFiles() (FileHandler method) +
+ + +
useUUIDs (MySQLData property) +
+ +
+ +
(MySQLDataFactory property) +
+ +
+
+ +

V

+ + + +
+ +
validate() (EntityDefinitionValidator method) +
+ +
+ +
(EntityDefinitionValidatorInterface method) +
+ + +
(EntityValidator method) +
+ +
+
+ +
validateEntityDefinition() (ServiceProvider method) +
+ +
+ +

W

+ + +
+ +
writeToCache() (YamlReader method) +
+ +
+ +

Y

+ + +
+ +
YamlReader (class) +
+ +
+ + + +
+
+
+ + +
+ +
+

+ © Copyright 2017, Philip Lehmann-Böhm. + +

+
+ Built with Sphinx using a theme provided by Read the Docs. + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/index.html b/docs/html/0.14.0/index.html new file mode 100644 index 0000000..ae9bac8 --- /dev/null +++ b/docs/html/0.14.0/index.html @@ -0,0 +1,388 @@ + + + + + + + + + + + Welcome to CRUDlex’s documentation! — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Welcome to CRUDlex’s documentation!

+

This is the documentation of CRUDlex, an easy to use CRUD generator for Silex. +It describes every feature being available.

+

Requirements:

+
    +
  • PHP >= 5.5
  • +
  • For the MySQL driver: MySQL >= 5.1
  • +
  • For the file uploads: PECL fileinfo >= 0.1.0
  • +
+_images/01_List.png +

Contents:

+
+

Manual

+ +
+ +
+
+

Indices and tables

+ +
+ + +
+
+
+ + + + +
+ +
+

+ © Copyright 2017, Philip Lehmann-Böhm. + +

+
+ Built with Sphinx using a theme provided by Read the Docs. + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/addons.html b/docs/html/0.14.0/manual/addons.html new file mode 100644 index 0000000..b86281a --- /dev/null +++ b/docs/html/0.14.0/manual/addons.html @@ -0,0 +1,372 @@ + + + + + + + + + + + Addons — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Addons

+

There are several surrounding projects around CRUDlex. Each of them is described here.

+
+

CRUDlexUser

+

CRUDlexUser is a library offering +an user provider for symfony/security

+

This library offers two parts. First, a management interface for your admin panel to +perform CRUD operations on your userbase and second, an symfony/security UserProvider +offering in order to connect the users with the application.

+
+

The Admin Panel

+

All you have to do is to add the needed entities to your crud.yml from the +following sub chapters.

+

In order to get the salt generated and the password hashed, you have to let the +library add some CRUDlex events in your initialization:

+
$crudUserSetup = new CRUDlex\UserSetup();
+$crudUserSetup->addEvents($app['crud']->getData('user'));
+
+
+
+

Users

+
user:
+    label: User
+    table: user
+    fields:
+        username:
+            type: text
+            label: Username
+            required: true
+            unique: true
+        password:
+            type: text
+            label: Password Hash
+            description: 'Set this to your desired password. Will be automatically converted to an hash value not meant to be readable.'
+            required: true
+        salt:
+            type: text
+            label: Password Salt
+            description: 'Auto populated field on user creation. Used internally.'
+            required: false
+        userRoles:
+            type: many
+            label: Roles
+            many:
+                entity: role
+                nameField: role
+                thisField: user
+                thatField: role
+
+
+

Plus any more fields you need.

+

Recommended for the password reset features:

+
email:
+    type: text
+    label: E-Mail
+    required: true
+    unique: true
+
+
+
+
+

Roles

+
role:
+    label: Roles
+    table: role
+    fields:
+        role:
+            type: text
+            label: Role
+            required: true
+
+
+
+
+
+

Password Reset

+

In case you want to use the password reset features:

+
passwordReset:
+    label: Password Resets
+    table: password_reset
+    fields:
+        user:
+            type: reference
+            label: User
+            reference:
+                nameField: username
+                entity: user
+            required: true
+        token:
+            type: text
+            label: Token
+            required: true
+        reset:
+            type: datetime
+            label: Reset
+
+
+
+
+

The UserProvider

+

Simply instantiate and add it to your symfony/security configuration:

+
$userProvider = new CRUDlex\UserProvider($app['crud']->getData('user'), $app['crud']->getData('userRole'));
+$app->register(new Silex\Provider\SecurityServiceProvider(), array(
+    'security.firewalls' => array(
+        'admin' => array(
+            //...
+            'users' => $userProvider
+        ),
+    ),
+));
+
+
+
+
+

Accessing Data of the Logged in User

+

In order to get the user data from the logged in user in your controller, you +might grab him like this:

+
$user = $app['security.token_storage']->getToken()
+
+
+

You get back a CRUDlex\User instance having some getters, see the API docs.

+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/constraints.html b/docs/html/0.14.0/manual/constraints.html new file mode 100644 index 0000000..e60d09e --- /dev/null +++ b/docs/html/0.14.0/manual/constraints.html @@ -0,0 +1,273 @@ + + + + + + + + + + + Constraints — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Constraints

+

Constraints are defined per field and control its content. Currently, two +types of constraints are supported:

+
    +
  • Whether a field is mandatory/required and the user needs to fill it
  • +
  • Whether a field should have unique content and no two rows can exist in the +database with the same value of this field
  • +
+

In our library/book example, we define a name of the library to be unique and +mandatory and the title of a book should be required:

+
library:
+    table: lib
+    label: Library
+    fields:
+        name:
+            type: text
+            required: true
+            unique: true
+book:
+    table: book
+    label: Book
+    fields:
+        title:
+            type: text
+            required: true
+        author:
+            type: text
+        library:
+            type: reference
+            reference:
+                nameField: name
+                entity: library
+
+
+

So it’s just as easy as adding either “required: true” or “unique: true” to the +field definition. Note that both constraints are used for the field “name” in +the entity “library”.

+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/crudyamlreference.html b/docs/html/0.14.0/manual/crudyamlreference.html new file mode 100644 index 0000000..2e12e9b --- /dev/null +++ b/docs/html/0.14.0/manual/crudyamlreference.html @@ -0,0 +1,376 @@ + + + + + + + + + + + CRUD YAML Reference — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

CRUD YAML Reference

+

Here is an overview of all possible CRUD YAML instructions. Be it optional or +required, along with the default value or behaviour.

+
# an entity named "library" starts here, used in URLs and in some API functions
+library:
+  # the label used in the UI like the navigation and flashes
+  label: Library
+  # the table of this entity in the data source
+  table: library
+  # if this property is given, then the named, referencing children of this
+  # entity are listed on the details page
+  childrenLabelFields:
+    # list the book children of a specific library entity, represented by
+    # their title field
+    book: title
+  # activates the filter feature for all given fields
+  filter: [name, isOpenOnSundays]
+  # if this is set to true, the deletion of a parent with children referencing
+  # it, causes no error but the deletion of the children, defaults to false
+  deleteCascade: true
+  # the size of one page on the list view, defaults to 25
+  pageSize: 10
+  # the initial sort field on the list view, defaults to created_at
+  initialSortField: name
+  # whether the list view is initially ascending (true) or descending (false)
+  # sorted, defaults to true
+  initialSortAscending: false
+  # This will create a top level item in the navigation bar called "learning"
+  # and put the library entity in a dropdown below the option. Defaults to
+  # 'main' (The entity will be in the top level of the navigation bar)
+  navBarGroup: learning
+  # the displayed fields on the list view, defaults to id, created_at, updated_at,
+  # and all given ones
+  listFields: [id, created_at, updated_at, name, type, opening, isOpenOnSundays]
+  # Whether the optimistic locking should be enabled. If this is false, the
+  # version field is unused and so not needed. Defaults to true.
+  optimisticLocking: true
+  # the fields of this entity
+  fields:
+    # the name of the field, must be identical to the column of the data source
+    name:
+      # the type of the field, in this case a single line text
+      type: text
+      # how the field is named in the UI, defaults to the field key if not given
+      label: Name
+      # whether this field is a required one when entering data in the UI
+      required: true
+      # whether the value of this field should occur only once, soft deleted rows
+      # not counting
+      unique: true
+    type:
+      # this field can have one value of a given set
+      type: set
+      # the allowed and presented values
+      items: [small,medium,large]
+    opening:
+      # this field represents a date and a time
+      type: datetime
+    isOpenOnSundays:
+      # this field can either be true or false
+      type: boolean
+    planet:
+      # the user can't change the value, a predefined one is always taken,
+      # useful for default values which might change to be editable in the
+      # future
+      type: fixed
+      # the fixed value to take
+      value: Earth
+    # as this is one side of a many-to-many relationship, this field key
+    # must be the name of the cross table
+    libraryBook:
+      # this field is one end of a many-to-many relationship
+      type: many
+      many:
+        # the related entity
+        entity: book
+        # what field to take from the related entity to visualize it
+        nameField: title
+        # the column of the cross table pointing to this entity
+        thisField: library
+        # the column of the cross table pointing to the related entity
+        thatField: book
+        # if set to true, the reference will be displayed without its id
+        hideId : false
+    homepage:
+      # this field is a text represented as URL in the UI
+      type: url
+book:
+  # the label which should be displayed if the "de" is selected as language
+  label_de: Bücher
+  table: book
+  # database entries will be hard deleted for this entry
+  hardDeletion: true
+  fields:
+    title:
+      type: text
+      # the label which should be displayed if "de" is selected as language
+      label_de: Titel
+    author:
+      type: text
+      label: Author
+      # the longer description explaining the field to the user on the details
+      # and form page
+      description: The Author of the Book
+    abstract:
+      # a multi line text field
+      type: multiline
+    frontpage:
+      # a visual WYSIWYM editor
+      type: wysiwym
+    pages:
+      # an integer field
+      type: integer
+    release:
+      # a date field
+      type: date
+    library:
+      # this field references another entity and so builds up an one-to-many relationship
+      type: reference
+      # the reference data
+      reference:
+        # the referenced entity
+        entity: library
+        # what field to take from the related entity to visualize it, defaults to the id
+        # if not given
+        nameField: name
+        # if set to true, the reference will be displayed without its id
+        hideId : false
+    price:
+      # this field is a floating point number
+      type: float
+      # the precision of a single step in the UI
+      floatStep: 0.1
+    cover:
+        # this fields points to an uploaded file
+        type: file
+        # the sub path of the file processor to store the uploads of this field in
+        path: uploads
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/datastructures.html b/docs/html/0.14.0/manual/datastructures.html new file mode 100644 index 0000000..5487c5b --- /dev/null +++ b/docs/html/0.14.0/manual/datastructures.html @@ -0,0 +1,318 @@ + + + + + + + + + + + Data Structure Definition — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Data Structure Definition

+

In the previous chapter, the ServiceProvider got the path to a crud.yml +told. This is where CRUDlex gets it’s information about what tables with what +fields exists in your database. We will build up a valid, small example as we +continue in this chapter.

+
+

Entities

+

The first items in the crud.yml are the entities. Each entity is describing a +single table with it’s fields. Let’s say we have two tables, libraries and +books. So we define two entities with the same name. Note that this name is +your choice, the table name of the database gets defined in a second.

+
library:
+book:
+
+
+

In this case, the entities would be available under this URLs (assuming you +mounted the Controller under “/crud”):

+
http://.../crud/library
+http://.../crud/book
+
+
+

Now we declare the labels and the tables. The label is used for displaying +links in the navigation and in some messages:

+
library:
+    label: Library
+    table: library
+book:
+    label: Book
+    table: book
+
+
+
+
+

Fields

+

So far, so good. In our minimal example, a library has a name and a Book has +an author, a title and the amount of pages as fields.

+
library:
+    label: Library
+    table: library
+    fields:
+        name:
+            type: text
+            label: Name
+book:
+    label: Book
+    table: book
+    fields:
+        author:
+            type: text
+            label: Author
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+

Note that the yml keys “name”, “author” and “title” directly name the database +column names. Each one has a type and a label here. The type defines the +database type and the label is used in various places to display the field. In +this example, only simple string types are used and an integer for the book +pages.

+

Beside this fields, the CRUDlex MySQL implementation assumes that you have some +more fields per table:

+
    +
  • id int(11) NOT NULL AUTO_INCREMENT: the id of each row
  • +
  • created_at datetime NOT NULL: a timestamp in UTC when the row was created
  • +
  • updated_at datetime NOT NULL: a timestamp in UTC when the row was the last time +updated
  • +
  • deleted_at datetime DEFAULT NULL: defines when this entry was deleted in UTC. +CRUDlex uses a soft delete mechanism hiding all rows where this is not null +(only if hard deletion is not activated)
  • +
  • version int(11) NOT NULL: used for optimistic locking
  • +
+

See the CRUDlexSample.sql in the sample +project for the exact table creation.

+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/datatypes.html b/docs/html/0.14.0/manual/datatypes.html new file mode 100644 index 0000000..a18efef --- /dev/null +++ b/docs/html/0.14.0/manual/datatypes.html @@ -0,0 +1,653 @@ + + + + + + + + + + + Data Types — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Data Types

+

This is a comprehensive list of all supported data types, their parameters and +the related MySQL-types.

+
+

Text

+
type: text
+
+
+

A single text line, no further parameters. Related MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR (recommended)
  • +
  • TINYTEXT
  • +
  • TEXT
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+
+
+

Multiline

+
type: multiline
+
+
+

A multi text line allowing linebreaks, no further parameters. Related MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR
  • +
  • TINYTEXT
  • +
  • TEXT (recommended)
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+

If the field is shown in the list view and the value is longer than 27 +characters, the rest is cut and replaced with three dots. The full text is still +available as tooltip in the list view though. Example with 50 characters:

+

“Lorem ipsum dolor sit amet, consetetur sadipscing”

+

Would be shown in the list view as:

+

“Lorem ipsum dolor sit amet,...”

+
+
+

WYSIWYM

+
type: multiline
+
+
+

A visual WYSIWYM (what you see is what you mean) editor producing HTML. Related +MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR
  • +
  • TINYTEXT
  • +
  • TEXT (recommended)
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+

Pay attention that the database type can store all content. Else, the HTML might be just cut and broken.

+
+
+

Url

+
type: url
+
+
+

A single text line representing an URL, no further parameters. Related +MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR (recommended)
  • +
  • TINYTEXT
  • +
  • TEXT
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+

The only difference to the type “text” is that url fields are clickable in the +list and show view. They are shortened in the list view to their base name in +order to save space. A value of:

+
http://www.foo.com/bar.txt
+
+
+

would lead to:

+
http://www.foo.com/bar.txt
+
+
+

on click and is shortened to “bar.txt” in the list.

+
+
+

Integer

+
type: integer
+
+
+

An integer, no further parameters. Related MySQL-types:

+
    +
  • TINYINT
  • +
  • SMALLINT
  • +
  • MEDIUMINT
  • +
  • INT (recommended)
  • +
  • BIGINT
  • +
+
+
+

Float

+
type: float
+floatStep: 0.1
+
+
+

An float. Related MySQL-types:

+
    +
  • FLOAT (recommended)
  • +
  • DECIMAL
  • +
  • DOUBLE (recommended)
  • +
  • REAL
  • +
+

The parameter “floatStep” is to set the step size in the form field.

+
+
+

Boolean

+
type: boolean
+
+
+

A boolean value, either true or false, no further parameters. Related MySQL-type:

+
    +
  • TINYINT
  • +
+

Saved as 0 (false) or 1 (true).

+
+
+

Date

+
type: date
+
+
+

A date value without time, no further parameters. Related MySQL-types:

+
    +
  • DATE
  • +
  • DATETIME (recommended)
  • +
  • TIMESTAMP
  • +
+
+
+

Datetime

+
type: datetime
+
+
+

A date value with time, no further parameters. Related MySQL-type:

+
    +
  • DATETIME (recommended)
  • +
  • TIMESTAMP
  • +
+
+
+

Set

+
type: set
+items: [red, green, blue]
+
+
+

A fixed set of elements to be chosen from, stored as text. Related MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR (recommended)
  • +
  • TINYTEXT
  • +
  • TEXT
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+

In this example, the user has the choice between the three colors “red”, “green” +and “blue”.

+
+
+

Reference

+
type: reference
+reference:
+  nameField: otherName
+  entity: otherEntity
+  hideId: false
+
+
+

This is the 1-side of a one-to-many relation. Related MySQL-type:

+
    +
  • INT
  • +
+

In order to display a proper selection UI and represent the the value from the +other table, a few more fields are needed. Those are the nameField describing +which field to use from the other table to display the selected value and last, +the referenced entity.

+

The nameField is optional. If it is not given, only the id of the referenced +entity is shown.

+

The optional parameter hideId allows to display the reference without its id, if set to true.

+

Think about a book in a library. The library is stored in the table “library” and +has a field “name”. A book belongs to a library, so it has an integer field +“library” referencing ids of libraries. Here is the needed yml for this +book-library relationship:

+
library:
+    table: lib
+    label: Library
+    fields:
+        name:
+            type: text
+book:
+    table: book
+    label: Book
+    fields:
+        title:
+            type: text
+        author:
+            type: text
+        library:
+            type: reference
+            reference:
+              nameField: name
+              entity: library
+
+
+
+

Show Children

+

If you want to show the children (books in this case) on the details page of the +parent (library), you can activate it via the childrenLabelFields:

+
library:
+    table: lib
+    label: Library
+    childrenLabelFields:
+        book: title
+    fields:
+        name:
+            type: text
+book:
+    table: book
+    label: Book
+    fields:
+        title:
+            type: text
+        author:
+            type: text
+        library:
+            type: reference
+            reference:
+              nameField: name
+              entity: library
+
+
+

On a details page of a library, all of its books are now displayed by their +title field. If a library had more children and their label fields are not +defined, it falls back to the id field.

+
+
+

Cascading Children Deletion

+

The default setup is, that referenced entities can’t be deleted until their +children are deleted. In this case, a library can’t be deleted until all of its +books are gone. You can force children deletion by using the deleteCascade +setting like this:

+
library:
+    table: lib
+    label: Library
+    childrenLabelFields:
+        book: title
+    deleteCascade: true
+    fields:
+        name:
+            type: text
+book:
+    table: book
+    label: Book
+    fields:
+        title:
+            type: text
+        author:
+            type: text
+        library:
+            type: reference
+            reference:
+              nameField: name
+              entity: library
+
+
+
+
+

MySQL Foreign Key Hint

+

Don’t forget to set the MySQL foreign key.

+
ALTER TABLE `book`
+ADD CONSTRAINT `book_ibfk_1` FOREIGN KEY (`library`) REFERENCES `lib` (`id`);
+
+
+
+
+
+

Many

+
libraryBook:
+    type: many
+    many:
+        entity: book
+        nameField: title
+        thisField: library
+        thatField: book
+        hideId: false
+
+
+

A many-to-many relation. For MySQL, the field key is the name of the cross table. +So the sample above translates to this structure:

+
CREATE TABLE `libraryBook` (
+  `library` int(11) NOT NULL,
+  `book` int(11) NOT NULL,
+  KEY `library` (`library`),
+  KEY `book` (`book`),
+  CONSTRAINT `librarybook_ibfk_1` FOREIGN KEY (`library`) REFERENCES `library` (`id`),
+  CONSTRAINT `librarybook_ibfk_2` FOREIGN KEY (`book`) REFERENCES `book` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+

The fields of the many key have the following meaning:

+
    +
  • entity: the other entity
  • +
  • nameField: the representing field on the other entity for button labels, +selection etc.; this key is optional, if it is not given, only the id will +be shown
  • +
  • thisField: the field of the cross table referencing the entity with the +many field
  • +
  • thatField: the field of the cross table referencing the other entity +named with the entity field of the many key
  • +
  • hideId (optional) allows to display the reference without its id, if set to true.
  • +
+

Think about a library having many books and a book being in many libraries. +The library is stored in the table “library” and has a field “name”. Here is +the needed yml for this book-library many-to-many relationship:

+
library:
+    table: lib
+    label: Library
+    fields:
+        name:
+            type: text
+        libraryBook:
+            type: many
+            many:
+                entity: book
+                nameField: title
+                thisField: library
+                thatField: book
+book:
+    table: book
+    label: Book
+    fields:
+        title:
+            type: text
+        author:
+            type: text
+
+
+

Attention: In the list view, it is not possible to sort by many fields as it +doesn’t make that much sense.

+
+
+

File

+

CRUDlex supports the handling of files. They get uploaded with the create or +edit form, can be viewed, removed and replaced.

+

To have an image field for our library, you would declare it like this:

+
library:
+    table: lib
+    label: Library
+    fields:
+        image:
+            type: file
+            path: uploads
+
+
+

The images are stored in the filesystem relative to your index.php within the +subfolder you give with the path parameter.

+

If you edit an entity with a file and re-upload it or if you delete the file or +if you delete the entity, the current implementation is defensive and doesn’t +physically delete the files.

+

See the File Handling chapter for more details.

+

Related MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR (recommended)
  • +
  • TINYTEXT
  • +
  • TEXT
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
+
+
+

Fixed

+
type: fixed
+value: abc
+
+
+

Fills the db always with the defined, fixed value, not editable. Related MySQL-types:

+
    +
  • CHAR
  • +
  • VARCHAR (recommended)
  • +
  • TINYTEXT
  • +
  • TEXT
  • +
  • MEDIUMTEXT
  • +
  • LONGTEXT
  • +
  • TINYINT
  • +
  • SMALLINT
  • +
  • MEDIUMINT
  • +
  • INT
  • +
  • BIGINT
  • +
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/definitionvalidation.html b/docs/html/0.14.0/manual/definitionvalidation.html new file mode 100644 index 0000000..db032cd --- /dev/null +++ b/docs/html/0.14.0/manual/definitionvalidation.html @@ -0,0 +1,258 @@ + + + + + + + + + + + Definition Validation — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Definition Validation

+

By default, CRUDlex validates the yml file and throws an exception if anything is wrong.

+
+

Turning off Validation

+

This costs a bit of performance, so you might want to turn it off in your production environment as it should be sure at +this point that the file is valid:

+
$app['crud.validateentitydefinition'] = $app['debug'];
+
+
+
+
+

Implementing a Custom Validator

+

It is possible to use your own validator by implementing the interface CRUDlexEntityDefinitionValidatorInterface +and handing it in before registering the service provider:

+
$app['crud.entitydefinitionvalidator'] = $myCustomValidator;
+
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/events.html b/docs/html/0.14.0/manual/events.html new file mode 100644 index 0000000..eca8264 --- /dev/null +++ b/docs/html/0.14.0/manual/events.html @@ -0,0 +1,282 @@ + + + + + + + + + + + Events — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Events

+

There are situations where you might want to react before or after an entity is +modified. For example hashing the password of an user object instead of storing +it directly in clear text in the database. Or you want to get an E-Mail every +time someone deletes a library object.

+

This is what events are for. You can define closures which are executed in +certain moments and can even interrupt the modification of the data.

+

This is how you define an event which is executed before an entity is created:

+
$app['crud']->getData('library')->getEvents()->push('before', 'create', function(CRUDlex\Entity $entity) {
+    // Do something with the entity which is about to be saved.
+    return true;
+});
+
+
+

This code should go in your setup directly after the ServiceProvider is +registered.

+

push takes three parameters:

+
    +
  • The moment of the event, can be:
      +
    • before
    • +
    • after
    • +
    +
  • +
  • The action of the event, can be:
      +
    • create: On entity creation
    • +
    • update: On entity update
    • +
    • delete: On entity deletion
    • +
    • createFiles: On created entity files handling
    • +
    • updateFiles: On updated entity files handling
    • +
    • deleteFiles: On deleted entity files handling
    • +
    • deleteFile: On deleting a file of an entity
    • +
    +
  • +
  • The closure to execute on this event. Signature: function(CRUDlex\Entity $entity)
  • +
+

You can push as many events for a moment and an action as you like. They will +be executed in the order they were added.

+

The before events must return a boolean. The first event returning false is +canceling the whole action and so the entity doesn’t get created, updated or +deleted.

+

With pop, the last added event of the given moment and action is +removed from the list and the closure is returned:

+
$closure = $app['crud']->getData('library')->getEvents()->pop('before', 'create');
+
+
+

If no more events are available, pop will return null.

+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/extendedfeatures.html b/docs/html/0.14.0/manual/extendedfeatures.html new file mode 100644 index 0000000..0063f51 --- /dev/null +++ b/docs/html/0.14.0/manual/extendedfeatures.html @@ -0,0 +1,586 @@ + + + + + + + + + + + Extended Features — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Extended Features

+

While continuing with the library example, we add some more features as we go.

+
+

Field Descriptions

+

Sometimes, you want to guide the user a bit more and be more descriptive than +just a label on the details and editpage of an entity. To do so, you can set a +description per field. In this case, the author of a book is more informative:

+
library:
+    label: Library
+    table: library
+    fields:
+        name:
+            type: text
+            label: Name
+book:
+    label: Book
+    table: book
+    fields:
+        author:
+            type: text
+            label: Author
+            description: The Author of the Book
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+
+
+

Displayed Fields in the List

+

As an addition, we only want to show the author and title in the big list +view of the books. We can do it by using the listFields entry:

+
library:
+    label: Library
+    table: library
+    fields:
+        name:
+            type: text
+            label: Name
+book:
+    label: Book
+    table: book
+    listFields: [id, created_at, updated_at, author, title]
+    fields:
+        author:
+            type: text
+            label: Author
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+

It is a simple list referencing the fields. Note the usage of the internal +fields “id”, “created_at” and “update_at”. “version” is not yet used and +every row where “deleted_at” is not null is marked as deleted, so this field +would make no sense to display.

+
+ +
+

Filters

+

Currently, the listview contains all entries on the pages. Often, it is desirable to filter it in order to search for specific entries. The fields to be allowed to filter on can be easily added with a filter array just like the listFields. This is how the books view could be filtered by author and title:

+
library:
+    label: Library
+    table: library
+    pageSize: 5
+    fields:
+        name:
+            type: text
+            label: Name
+book:
+    label: Book
+    table: book
+    listFields: [id, created_at, updated_at, author, title]
+    filter: [author, title]
+    fields:
+        author:
+            type: text
+            label: Author
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+
+
+

Hard Deletion

+

By default, CRUDlex uses a soft deletion mechanism by only setting a deleted_at field. Hard deletion from the database +can be activated though via the “hardDeletion” flag like this:

+
library:
+    table: library
+    hardDeletion: true
+    fields:
+        name:
+            type: text
+            label: Name
+
+
+

If activated, the column “deleted_at” is not needed in the entities table.

+
+
+

Group entities in the Navigation Bar

+

Each entity represents and option in the navigation bar at the top. If there are +too many entities or want to group based on relations between the entities, you +can add a “navBarGroup” option. In this case we group library and books under +“Learning Resources”:

+
library:
+    label: Library
+    table: library
+    navBarGroup: Learning Resources
+    fields:
+        name:
+            type: text
+            label: Name
+book:
+    label: Book
+    table: book
+    navBarGroup: Learning Resources
+    fields:
+        author:
+            type: text
+            label: Author
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+
+
+

I18n

+

Here are some features around the i18n support.

+
+

Set the Translations of Entity- and Field-Labels

+

You can translate the labels of the entities and their fields using some special +label keys: label_(locale) with (locale) being your desired locale. Example +for de:

+
book:
+    label: Book
+    label_de: Buch
+    table: book
+    listFields: [id, created_at, updated_at, author, title]
+    filter: [author, title]
+    fields:
+        author:
+            type: text
+            label: Author
+            label_de: Autor
+        title:
+            type: text
+            label: Title
+            label_de: Titel
+        pages:
+            type: integer
+            label: Pages
+            label_de: Seiten
+
+
+
+
+

Switch off I18n Management

+

Per default, CRUDlex manages i18n for you. But this might be not desired in +bigger projects, so you can disable it on registration like this:

+
$app->register(new CRUDlex\ServiceProvider(), array(
+    'crud.file' => __DIR__ . '<yourCrud.yml>',
+    'crud.datafactory' => $dataFactory,
+    'crud.manageI18n' => false
+));
+
+
+
+
+
+

Initial Sorting Parameters

+

Initially, when you visit the list page of an entity, the view is sorted ascending +by created_at. There might be cases, where you want to change that.

+

For this, two parameters can be set on entity level:

+
    +
  • initialSortField: Sets the field the data is sort by
  • +
  • initialSortAscending: If set to true, the initial sort order is ascending, +if set to false, the initial sort order is descending
  • +
+

Here is an example where the books are sorted by their author in an descending +order:

+
book:
+    label: Book
+    table: book
+    filter: [author, title]
+    initialSortField: author
+    initialSortAscending: false
+    fields:
+        author:
+            type: text
+            label: Author
+        title:
+            type: text
+            label: Title
+        pages:
+            type: integer
+            label: Pages
+
+
+

Attention: In the list view, it is not possible to sort by many fields as it +doesn’t make that much sense.

+
+
+

Using UUIDs as Primary Key Instead of an Auto Incremented Value

+

CRUDMySQLData offers an option to use UUIDs as primary key instead of an auto +incremented value.

+

First, you have to create your id field as varchar(36):

+
`id` varchar(36) NOT NULL
+
+
+

And then you have to activate it in the setup when creating the +CRUDDataFactoryInterface:

+
$dataFactory = new CRUDlex\MySQLDataFactory($app['db'], true);
+
+
+
+
+

Using the CRUD YAML file cache

+

Parsing the CRUD YAML file cache on each request can have an impact on the performance with bigger files. To mitigate +this, CRUDlex can cache the parsed content to a PHP file. Using a PHP file has the advantage, that this is then cached +for free by the opcode cache of PHP.

+

To activate the caching, you simply pass a path to a writable directory on registration:

+
$app->register(new CRUDlex\ServiceProvider(), array(
+    'crud.filecachingdirectory' => '/path/to/a/writable/directory'
+));
+
+
+

Note that CRUDlex doesn’t do any cache invalidation. You have to delete the cached files yourself if needed. This is the +case if the crud.yml got modified for example.

+
+
+

Using an own Implementation of the EntityDefinition

+

There might be the case where you want to use an own implementation derived from the EntityDefinition. In this case, +you can hand in an own implementation of the EntityDefinitionFactory like this:

+
$entityDefinitionFactory = new MyOwnEntityDefinitionFactory();
+$app->register(new CRUDlex\ServiceProvider(), array(
+    'crud.entitydefinitionfactory' => $entityDefinitionFactory
+));
+
+
+
+
+

Prepopulated Form Fields on the Creation Page

+

You can set some initial values when you link the creation page from somewhere +else by handing in the appropriate GET parameter. Example for the author of a +book: .../book/create?author=MyAuthor

+
+
+

Combine with the Web Profiler

+

If you want to use the package “silex/web-profiler”, you have to register the +LocaleServiceProvider and TranslationServiceProvider on your own first:

+
$app->register(new Silex\Provider\LocaleServiceProvider());
+$app->register(new \Silex\Provider\TranslationServiceProvider(), array(
+    'locale_fallbacks' => array('en'),
+));
+
+
+
+
+

Serving Static Content via the Webserver

+

It might be beneficial to serve the static content like CSS files directly via the webserver as it has some performance +advantages.

+

Both solutions assume that the folder vendor/philiplb/crudlex/src/static is accessible. <mountPath> is the path the +ControllerProvider is mounted to.

+
+

Apache

+

The requests to the static route can be redirected to the static files:

+
RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{QUERY_STRING} ^file=(.*)$
+RewriteRule <mountPath>/resource/static$ vendor/philiplb/crudlex/src/static/%1 [QSA,L]
+
+
+
+
+

nginx

+

A location with the try_files directive can serve the static files like this:

+
location /<mountPath>/resource/static {
+    try_files /vendor/philiplb/crudlex/src/static/$arg_file =404;
+}
+
+
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/filehandling.html b/docs/html/0.14.0/manual/filehandling.html new file mode 100644 index 0000000..12376e2 --- /dev/null +++ b/docs/html/0.14.0/manual/filehandling.html @@ -0,0 +1,309 @@ + + + + + + + + + + + File Handling — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

File Handling

+

By default, CRUDlex uses the filesystem to store uploaded files. The current working directory is taken as root here. +Usually, this is the path to your index.php. So this example stores the image files under <workingDirectory>/uploads

+
library:
+    table: lib
+    label: Library
+    fields:
+        image:
+            type: file
+            path: uploads
+
+
+

One big drawback here is that the application is not stateless anymore according to https://12factor.net/processes. But +luckily, the file handling is done via Flysystem and the used +FilesystemInterface can be overridden easily by setting a service called “crud.filesystem”.

+

In any way, overriding or not, the underlying FilesystemInterface is available via

+
$app['crud.filesystem']
+
+
+
+

Overriding the Default Storage with Amazon S3 as Filesystem

+

Here is an example of using Amazon S3 as storage.

+

First, get the AwsS3Adapter:

+
composer require league/flysystem-aws-s3-v3
+
+
+

And then configure it and hand it over to CRUDlex:

+
$client = S3Client::factory([
+    'credentials' => [
+        'key'    => $key,
+        'secret' => $secret
+    ],
+    'region' => $region,
+    'version' => 'latest',
+]);
+$adapter = new \League\Flysystem\AwsS3v3\AwsS3Adapter($client, $bucket);
+$filesystem = new \League\Flysystem\Filesystem($adapter);
+$dataFactory = new \CRUDlex\MySQLDataFactory($app['db']);
+$app->register(new \CRUDlex\ServiceProvider(), array(
+    'crud.file' => __DIR__ . '/../crud.yml',
+    'crud.datafactory' => $dataFactory,
+    'crud.filesystem' => $filesystem,
+));
+
+
+
+
+

Filesystem Storage Adapters

+

Many more adapters are available for Flysystem, including (as of writing):

+
    +
  • Local
  • +
  • Azure
  • +
  • AWS S3 V2
  • +
  • AWS S3 V3
  • +
  • Copy.com
  • +
  • Dropbox
  • +
  • FTP
  • +
  • GridFS
  • +
  • Memory
  • +
  • Null / Test
  • +
  • Rackspace
  • +
  • ReplicateAdapter
  • +
  • SFTP
  • +
  • WebDAV
  • +
  • PHPCR
  • +
  • ZipArchive
  • +
+

See the Flysystem page for their usage.

+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/introduction.html b/docs/html/0.14.0/manual/introduction.html new file mode 100644 index 0000000..533fcb4 --- /dev/null +++ b/docs/html/0.14.0/manual/introduction.html @@ -0,0 +1,261 @@ + + + + + + + + + + + Introduction — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Introduction

+

CRUDlex is an easy to use CRUD generator for Silex. +CRUD is an abbreviation standing for

+
    +
  • C reate
  • +
  • R ead
  • +
  • U pdate
  • +
  • D elete
  • +
+

Often, you have a database where you are in need of an administration +application. +You have some database tables you need to manage with exactly this actions:

+
    +
  • A list of entries in each table
  • +
  • To be able to create entries
  • +
  • View each entry on it’s own with all details
  • +
  • Edit the entry
  • +
  • Delete the entry
  • +
+

It is tedious to write this on your own. Not hard, but always the same with +only the table names, field names, field types etc. varying.

+

This is where CRUDlex comes in. Whenever you need a quick administration panel +for your Silex application, it might be a good starting point. It is easy to use +with minimal configuration but still offers a lot of features and flexibility.

+

In the next chapter, a most basic setup is described.

+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/layouts.html b/docs/html/0.14.0/manual/layouts.html new file mode 100644 index 0000000..75fd099 --- /dev/null +++ b/docs/html/0.14.0/manual/layouts.html @@ -0,0 +1,356 @@ + + + + + + + + + + + Overriding Layouts — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Overriding Layouts

+

Each CRUDlex page extends from a certain layout with the default +“@crud/layout.twig”.

+

In most cases you don’t want to use this standard layout coming with CRUDlex. +This chapter shows you how to define your own layout templates on various +levels.

+

First of all, you need to place the Twig-templates in a folder known by the +Twig service provider. Assuming you have your templates in the folder +__DIR__.’/../views’, you initialize the Twig service provider like this:

+
$app->register(new Silex\Provider\TwigServiceProvider(), array(
+    'twig.path' => _ _DIR_ _.'/../views'
+));
+
+
+

A good starting point is the layout template coming with CRUDlex: +src/views/layout.twig

+

CRUDlex resolves the layout to use in an hierarchy. More specific layouts +override the general ones. The following subchapters are ordered in this +hierarchy, from general to specific.

+
+

Global

+

If you want to override the general layout of all CRUDlex pages, you set this +property of your Silex Application instance:

+
$app['crud.layout'] = 'myLayout.twig';
+
+
+
+
+

Single Actions

+

You can override the layout of single actions:

+
    +
  • create
  • +
  • list
  • +
  • show
  • +
  • edit
  • +
+

Just prepend a dot and the desired action when defining the layout for it, for +example the action “show”:

+
$app['crud.layout.show'] = 'myShowLayout.twig';
+
+
+
+
+

Single Entities

+

To override the layout of a single entity, you prepend a dot and the desired +entity name, for example for the book entity:

+
$app['crud.layout.book'] = 'myBookLayout.twig';
+
+
+
+
+

Single Actions of an Entity

+

The most specific layout you can set is for a single action of a specific +entity. The prefix is a dot, the action another dot and the entity. To override +the create action of the book entity, you would define your layout like this:

+
$app['crud.layout.create.book'] = 'myCreateBookLayout.twig';
+
+
+
+
+

Your own Layout from Scratch

+

If you want to start from scratch, it is recommended to use the layout coming +with CRUDlex as a starting point: +“vendor/philiplb/crudlex/src/views/layout.twig”

+

This one shows a menu with all defined entities linking to their list view.

+

First, you have to define a block called “content”. +This is where CRUDlex renders itself into:

+
{% block content %}{% endblock %}
+
+
+

In the head-section, you should include the template “@crud/header.twig”:

+
{% include '@crud/header.twig' %}
+
+
+

This one includes all needed CSS files like Bootstrap 3 and the CSS of the +datetime picker. Have a look at its content if you already include Bootstrap.

+

At the bottom of the page before the closing body tag, you include the template +“@crud/footer.twig”:

+
{% include '@crud/footer.twig' %}
+
+
+

It includes the JavaScript of:

+
    +
  • jQuery
  • +
  • Bootstrap
  • +
  • Moment
  • +
  • Datetimepicker
  • +
+

Plus it initializes the datepickers, the datetimepickers and tooltips.

+

It’s also recommended to include flashes in your own layout like this:

+
{% if app.session.flashBag is defined %}
+    {% set flashTypeAvailable = [ 'success', 'danger'] %}
+    {% for flashType in flashTypeAvailable %}
+        {% for flash in app.session.flashBag.get(flashType) %}
+          <div class="alert alert-{{ flashType }}" >
+              <button class="close" data-dismiss="alert">×</button>
+              {{ flash }}
+          </div>
+        {% endfor %}
+    {% endfor %}
+{% endif %}
+
+
+

And some CSS classes to implement:

+
.btn-crudlex {
+    margin: 5px 5px 5px 5px;
+}
+.tooltip-crudlex {
+    cursor: pointer;
+}
+
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/optimisticlocking.html b/docs/html/0.14.0/manual/optimisticlocking.html new file mode 100644 index 0000000..68d8a83 --- /dev/null +++ b/docs/html/0.14.0/manual/optimisticlocking.html @@ -0,0 +1,255 @@ + + + + + + + + + + + Optimistic Locking — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Optimistic Locking

+

By default, CRUDlex uses optimistic locking via the version field. This means that the version field is incremented on +each update of an entity. The current version is sent on submitting the edit form and then compared to the existing one +in the database. If those two values are not equal, someone else was faster in editing the entity. Now, the update is +rejected as the new values in the database sent by the other person would be lost.

+

This behaviour can be adjusted:

+
library:
+    label: Library
+    table: library
+    optimisticLocking: true
+    fields:
+        name:
+            type: text
+            label: Name
+
+
+

The default value is true and so optimistic locking is activated. If it is set to false, it is switched off and the +version field is not used. Neither incremented nor checked on form submission. It then doesn’t need to exist in the +database table.

+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/routes.html b/docs/html/0.14.0/manual/routes.html new file mode 100644 index 0000000..faf3dea --- /dev/null +++ b/docs/html/0.14.0/manual/routes.html @@ -0,0 +1,269 @@ + + + + + + + + + + + Routes — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Routes

+

The ControllerProvider adds a bunch of routes used by CRUDlex which are useful to know if one wants to link to them or +add middleware.

+
+

List

+

This are the name of the routes added by the ControllerProvider.

+
    +
  • crudStatic: fetches static resources like CSS files (GET)
  • +
  • crudCreate: shows the new entity form (GET) and creates it (POST)
  • +
  • crudList: shows the list of entities (GET)
  • +
  • crudShow: shows a specific entity (GET)
  • +
  • crudEdit: shows the update entity form (GET) and updates it (POST)
  • +
  • crudDelete: deletes an entity (POST)
  • +
  • crudRenderFile: shows a file of an entity (GET)
  • +
  • crudDeleteFile: deletes a file of an entity (POST)
  • +
  • crudSetLocale: switches the locale of the UI (GET)
  • +
+
+
+

Adding Middleware

+

Here is an example of how to add a middleware after mounting the ControllerProvider:

+
$app->flush();
+$route = $app['routes']->get('crudList');
+$route->before(function(Symfony\Component\HttpFoundation\Request $request) use ($app) {
+    // Do your stuff.
+});
+
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/setup.html b/docs/html/0.14.0/manual/setup.html new file mode 100644 index 0000000..f6d0e4b --- /dev/null +++ b/docs/html/0.14.0/manual/setup.html @@ -0,0 +1,284 @@ + + + + + + + + + + + Setup — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Setup

+

This chapter guides you through a minimal setup. Further options like overriding +templates are discussed in later sections.

+

First, you have to add CRUDlex to your composer.json:

+
composer require "philiplb/crudlex"
+
+
+

Then comes the actual setup. Currently, only MySQL is supported. Although the +database layer is kept in an abstract way, so in future more data stores will +come. It relies on the DoctrineServiceProvider which has to be initialized and +registered:

+
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
+    'dbs.options' => array(
+        'default' => array(
+            'host' => '<yourHost>',
+            'dbname' => '<yourDBName>',
+            'user' => '<yourDBUser',
+            'password' => '<yourDBPassword>',
+            'charset' => 'utf8',
+        )
+    )
+));
+
+
+

Now follows the setup of CRUDlex itself. First of all, we create an instance +of the MySQLDataFactory, internally taking care of creating MySQL-DB-access +objects:

+
$dataFactory = new CRUDlex\MySQLDataFactory($app['db']);
+
+
+

Now it’s time to register the ServiceProvider itself:

+
$app->register(new CRUDlex\ServiceProvider(), array(
+    'crud.file' => __DIR__ . '<yourCrud.yml>',
+    'crud.datafactory' => $dataFactory
+));
+
+
+

The content of the crud.yml (or whatever you name it) will be discussed in the +next chapter.

+

Now it’s time to mount the Controller:

+
$app->mount('/crud', new CRUDlex\ControllerProvider());
+
+
+

And that’s it. Your CRUD UI should be available now, for example if you +defined a book entity in the crud.yml:

+
http://.../crud/book
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/manual/templates.html b/docs/html/0.14.0/manual/templates.html new file mode 100644 index 0000000..c6f533c --- /dev/null +++ b/docs/html/0.14.0/manual/templates.html @@ -0,0 +1,301 @@ + + + + + + + + + + + Overriding Templates — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+ +
+
+
+
+ +
+

Overriding Templates

+

If you need to adjust the templates of single pages, you can’t achieve that with +just overriding the layout. Example: You want to add a button to the action +column of the list page of the entity “book”. For that, you have to override the +Twig block “content”. But with just the layout, you simply can’t. CRUDlex +uses for this page a template “@crud/list.twig” which extends the so far +overridable layout.

+

In this case, you can override the template of a single page:

+
$app['crud.template.list.book'] = 'bookList.twig';
+
+
+

Note the changed part “template” of the key!

+

The rest of the internal template selection works like the layouts. You don’t +need to specify the entity if you want to adjust all list pages for example.

+

Note that you find all used templates in “src/views/”, they give a good starting +point to tweak.

+
+

Templates Included by the Layout

+

The layout.twig includes those templates:

+
    +
  • header: The included header (@crud/header.twig)
  • +
  • footer: The included footer (@crud/footer.twig)
  • +
+
+
+

Templates for the Single Action Pages

+

This are the “root”-templates directly included in the layout.twig:

+
    +
  • form: The create and edit page (@crud/form.twig)
  • +
  • list: The list page (@crud/list.twig)
  • +
  • show: The show page (@crud/show.twig)
  • +
+
+
+

Form Field Templates

+

And this are the form field templates for each type:

+
    +
  • booleanField: The form field for the type bool (@crud/boolField.twig)
  • +
  • dateField: The form field for the type date (@crud/dateField.twig)
  • +
  • datetimeField: The form field for the type datetime (@crud/datetimeField.twig)
  • +
  • fileField: The form field for the type file (@crud/fileField.twig)
  • +
  • fixedField: The form field for the type fixed (@crud/fixedField.twig)
  • +
  • floatField: The form field for the type float (@crud/floatField.twig)
  • +
  • integerField: The form field for the type int (@crud/intField.twig)
  • +
  • multilineField: The form field for the type multiline (@crud/multilineField.twig)
  • +
  • referenceField: The form field for the type reference (@crud/referenceField.twig)
  • +
  • setField: The form field for the type set (@crud/setField.twig)
  • +
  • textField: The form field for the type text (@crud/textField.twig)
  • +
  • urlField: The form field for the type url (@crud/urlField.twig)
  • +
+
+
+

Additional Templates

+

In addition, these templates exists:

+
    +
  • fieldLabel: A label of a form field (@crud/fieldLabel.twig)
  • +
  • renderField: The rendering of a field value on the list or the show page (@crud/renderField.twig)
  • +
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/objects.inv b/docs/html/0.14.0/objects.inv new file mode 100644 index 0000000..608bdd1 Binary files /dev/null and b/docs/html/0.14.0/objects.inv differ diff --git a/docs/html/0.14.0/search.html b/docs/html/0.14.0/search.html new file mode 100644 index 0000000..b89317d --- /dev/null +++ b/docs/html/0.14.0/search.html @@ -0,0 +1,239 @@ + + + + + + + + + + + Search — CRUDlex 0.14.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + +
+
    +
  • Docs »
  • + +
  • +
  • + +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ + +
+ +
+

+ © Copyright 2017, Philip Lehmann-Böhm. + +

+
+ Built with Sphinx using a theme provided by Read the Docs. + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/html/0.14.0/searchindex.js b/docs/html/0.14.0/searchindex.js new file mode 100644 index 0000000..08fa2e4 --- /dev/null +++ b/docs/html/0.14.0/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({envversion:46,filenames:["api/AbstractData","api/ControllerProvider","api/DataFactoryInterface","api/Entity","api/EntityDefinition","api/EntityDefinitionFactory","api/EntityDefinitionFactoryInterface","api/EntityDefinitionValidator","api/EntityDefinitionValidatorInterface","api/EntityEvents","api/EntityValidator","api/FileHandler","api/ManyValidator","api/MySQLData","api/MySQLDataFactory","api/ReferenceValidator","api/ServiceProvider","api/StreamedFileResponse","api/TwigExtensions","api/UniqueValidator","api/YamlReader","index","manual/addons","manual/constraints","manual/crudyamlreference","manual/datastructures","manual/datatypes","manual/definitionvalidation","manual/events","manual/extendedfeatures","manual/filehandling","manual/introduction","manual/layouts","manual/optimisticlocking","manual/routes","manual/setup","manual/templates"],objects:{"":{"AbstractData::$definition":[0,1,1,""],"AbstractData::$events":[0,1,1,""],"AbstractData::$filesystem":[0,1,1,""],"AbstractData::DELETION_FAILED_EVENT":[0,2,1,""],"AbstractData::DELETION_FAILED_STILL_REFERENCED":[0,2,1,""],"AbstractData::DELETION_SUCCESS":[0,2,1,""],"AbstractData::countBy":[0,0,1,""],"AbstractData::create":[0,0,1,""],"AbstractData::createEmpty":[0,0,1,""],"AbstractData::delete":[0,0,1,""],"AbstractData::deleteChildren":[0,0,1,""],"AbstractData::doCreate":[0,0,1,""],"AbstractData::doDelete":[0,0,1,""],"AbstractData::doUpdate":[0,0,1,""],"AbstractData::enrichEntityWithMetaData":[0,0,1,""],"AbstractData::get":[0,0,1,""],"AbstractData::getDefinition":[0,0,1,""],"AbstractData::getEvents":[0,0,1,""],"AbstractData::getFormFields":[0,0,1,""],"AbstractData::getIdToNameMap":[0,0,1,""],"AbstractData::getManyFields":[0,0,1,""],"AbstractData::getReferenceIds":[0,0,1,""],"AbstractData::hasManySet":[0,0,1,""],"AbstractData::hydrate":[0,0,1,""],"AbstractData::listEntries":[0,0,1,""],"AbstractData::update":[0,0,1,""],"ControllerProvider::buildUpListFilter":[1,0,1,""],"ControllerProvider::connect":[1,0,1,""],"ControllerProvider::create":[1,0,1,""],"ControllerProvider::delete":[1,0,1,""],"ControllerProvider::deleteFile":[1,0,1,""],"ControllerProvider::edit":[1,0,1,""],"ControllerProvider::getAfterDeleteRedirectParameters":[1,0,1,""],"ControllerProvider::getNotFoundPage":[1,0,1,""],"ControllerProvider::modifyEntity":[1,0,1,""],"ControllerProvider::modifyFilesAndSetFlashBag":[1,0,1,""],"ControllerProvider::renderFile":[1,0,1,""],"ControllerProvider::setLocale":[1,0,1,""],"ControllerProvider::setValidationFailedFlashes":[1,0,1,""],"ControllerProvider::setupI18n":[1,0,1,""],"ControllerProvider::setupRoutes":[1,0,1,""],"ControllerProvider::setupTemplates":[1,0,1,""],"ControllerProvider::show":[1,0,1,""],"ControllerProvider::showList":[1,0,1,""],"ControllerProvider::staticFile":[1,0,1,""],"DataFactoryInterface::createData":[2,0,1,""],"Entity::$definition":[3,1,1,""],"Entity::$entity":[3,1,1,""],"Entity::__construct":[3,0,1,""],"Entity::get":[3,0,1,""],"Entity::getDefinition":[3,0,1,""],"Entity::getRaw":[3,0,1,""],"Entity::populateViaRequest":[3,0,1,""],"Entity::set":[3,0,1,""],"Entity::toType":[3,0,1,""],"EntityDefinition::$children":[4,1,1,""],"EntityDefinition::$childrenLabelFields":[4,1,1,""],"EntityDefinition::$deleteCascade":[4,1,1,""],"EntityDefinition::$fields":[4,1,1,""],"EntityDefinition::$filter":[4,1,1,""],"EntityDefinition::$hardDeletion":[4,1,1,""],"EntityDefinition::$initialSortAscending":[4,1,1,""],"EntityDefinition::$initialSortField":[4,1,1,""],"EntityDefinition::$label":[4,1,1,""],"EntityDefinition::$listFields":[4,1,1,""],"EntityDefinition::$locale":[4,1,1,""],"EntityDefinition::$localeLabels":[4,1,1,""],"EntityDefinition::$navBarGroup":[4,1,1,""],"EntityDefinition::$optimisticLocking":[4,1,1,""],"EntityDefinition::$pageSize":[4,1,1,""],"EntityDefinition::$serviceProvider":[4,1,1,""],"EntityDefinition::$standardFieldLabels":[4,1,1,""],"EntityDefinition::$table":[4,1,1,""],"EntityDefinition::__construct":[4,0,1,""],"EntityDefinition::addChild":[4,0,1,""],"EntityDefinition::checkFieldNames":[4,0,1,""],"EntityDefinition::getChildren":[4,0,1,""],"EntityDefinition::getChildrenLabelFields":[4,0,1,""],"EntityDefinition::getEditableFieldNames":[4,0,1,""],"EntityDefinition::getField":[4,0,1,""],"EntityDefinition::getFieldLabel":[4,0,1,""],"EntityDefinition::getFieldNames":[4,0,1,""],"EntityDefinition::getFilter":[4,0,1,""],"EntityDefinition::getFilteredFieldNames":[4,0,1,""],"EntityDefinition::getInitialSortField":[4,0,1,""],"EntityDefinition::getLabel":[4,0,1,""],"EntityDefinition::getListFields":[4,0,1,""],"EntityDefinition::getLocale":[4,0,1,""],"EntityDefinition::getNavBarGroup":[4,0,1,""],"EntityDefinition::getPageSize":[4,0,1,""],"EntityDefinition::getPublicFieldNames":[4,0,1,""],"EntityDefinition::getReadOnlyFields":[4,0,1,""],"EntityDefinition::getServiceProvider":[4,0,1,""],"EntityDefinition::getSubTypeField":[4,0,1,""],"EntityDefinition::getTable":[4,0,1,""],"EntityDefinition::getType":[4,0,1,""],"EntityDefinition::hasOptimisticLocking":[4,0,1,""],"EntityDefinition::isDeleteCascade":[4,0,1,""],"EntityDefinition::isHardDeletion":[4,0,1,""],"EntityDefinition::isInitialSortAscending":[4,0,1,""],"EntityDefinition::setChildrenLabelFields":[4,0,1,""],"EntityDefinition::setDeleteCascade":[4,0,1,""],"EntityDefinition::setField":[4,0,1,""],"EntityDefinition::setFieldLabel":[4,0,1,""],"EntityDefinition::setFilter":[4,0,1,""],"EntityDefinition::setHardDeletion":[4,0,1,""],"EntityDefinition::setInitialSortAscending":[4,0,1,""],"EntityDefinition::setInitialSortField":[4,0,1,""],"EntityDefinition::setLabel":[4,0,1,""],"EntityDefinition::setListFields":[4,0,1,""],"EntityDefinition::setLocale":[4,0,1,""],"EntityDefinition::setNavBarGroup":[4,0,1,""],"EntityDefinition::setOptimisticLocking":[4,0,1,""],"EntityDefinition::setPageSize":[4,0,1,""],"EntityDefinition::setServiceProvider":[4,0,1,""],"EntityDefinition::setTable":[4,0,1,""],"EntityDefinition::setType":[4,0,1,""],"EntityDefinitionFactory::createEntityDefinition":[5,0,1,""],"EntityDefinitionFactoryInterface::createEntityDefinition":[6,0,1,""],"EntityDefinitionValidator::validate":[7,0,1,""],"EntityDefinitionValidatorInterface::validate":[8,0,1,""],"EntityEvents::$events":[9,1,1,""],"EntityEvents::pop":[9,0,1,""],"EntityEvents::push":[9,0,1,""],"EntityEvents::shouldExecute":[9,0,1,""],"EntityValidator::$definition":[10,1,1,""],"EntityValidator::$entity":[10,1,1,""],"EntityValidator::__construct":[10,0,1,""],"EntityValidator::buildUpData":[10,0,1,""],"EntityValidator::buildUpRules":[10,0,1,""],"EntityValidator::fieldConstraintsToRules":[10,0,1,""],"EntityValidator::fieldTypeToRules":[10,0,1,""],"EntityValidator::validate":[10,0,1,""],"FileHandler::$entityDefinition":[11,1,1,""],"FileHandler::$filesystem":[11,1,1,""],"FileHandler::__construct":[11,0,1,""],"FileHandler::createFiles":[11,0,1,""],"FileHandler::deleteFile":[11,0,1,""],"FileHandler::deleteFiles":[11,0,1,""],"FileHandler::getPath":[11,0,1,""],"FileHandler::performOnFiles":[11,0,1,""],"FileHandler::renderFile":[11,0,1,""],"FileHandler::shouldWriteFile":[11,0,1,""],"FileHandler::updateFiles":[11,0,1,""],"ManyValidator::getInvalidDetails":[12,0,1,""],"ManyValidator::isValid":[12,0,1,""],"MySQLData::$database":[13,1,1,""],"MySQLData::$definition":[13,1,1,""],"MySQLData::$events":[13,1,1,""],"MySQLData::$filesystem":[13,1,1,""],"MySQLData::$useUUIDs":[13,1,1,""],"MySQLData::DELETION_FAILED_EVENT":[13,2,1,""],"MySQLData::DELETION_FAILED_STILL_REFERENCED":[13,2,1,""],"MySQLData::DELETION_SUCCESS":[13,2,1,""],"MySQLData::__construct":[13,0,1,""],"MySQLData::addFilter":[13,0,1,""],"MySQLData::addPagination":[13,0,1,""],"MySQLData::addSoftDeletionToQuery":[13,0,1,""],"MySQLData::addSort":[13,0,1,""],"MySQLData::countBy":[13,0,1,""],"MySQLData::create":[13,0,1,""],"MySQLData::createEmpty":[13,0,1,""],"MySQLData::delete":[13,0,1,""],"MySQLData::deleteChildren":[13,0,1,""],"MySQLData::deleteManyToManyReferences":[13,0,1,""],"MySQLData::doCreate":[13,0,1,""],"MySQLData::doDelete":[13,0,1,""],"MySQLData::doUpdate":[13,0,1,""],"MySQLData::enrichEntityWithMetaData":[13,0,1,""],"MySQLData::enrichWithMany":[13,0,1,""],"MySQLData::enrichWithManyField":[13,0,1,""],"MySQLData::enrichWithReference":[13,0,1,""],"MySQLData::fetchReferencesForField":[13,0,1,""],"MySQLData::generateUUID":[13,0,1,""],"MySQLData::get":[13,0,1,""],"MySQLData::getDefinition":[13,0,1,""],"MySQLData::getEvents":[13,0,1,""],"MySQLData::getFormFields":[13,0,1,""],"MySQLData::getIdToNameMap":[13,0,1,""],"MySQLData::getManyFields":[13,0,1,""],"MySQLData::getManyIds":[13,0,1,""],"MySQLData::getReferenceIds":[13,0,1,""],"MySQLData::hasChildren":[13,0,1,""],"MySQLData::hasManySet":[13,0,1,""],"MySQLData::hydrate":[13,0,1,""],"MySQLData::listEntries":[13,0,1,""],"MySQLData::saveMany":[13,0,1,""],"MySQLData::setValuesAndParameters":[13,0,1,""],"MySQLData::update":[13,0,1,""],"MySQLDataFactory::$database":[14,1,1,""],"MySQLDataFactory::$useUUIDs":[14,1,1,""],"MySQLDataFactory::__construct":[14,0,1,""],"MySQLDataFactory::createData":[14,0,1,""],"ReferenceValidator::getInvalidDetails":[15,0,1,""],"ReferenceValidator::isValid":[15,0,1,""],"ServiceProvider::$datas":[16,1,1,""],"ServiceProvider::boot":[16,0,1,""],"ServiceProvider::configureDefinition":[16,0,1,""],"ServiceProvider::createDefinition":[16,0,1,""],"ServiceProvider::getData":[16,0,1,""],"ServiceProvider::getEntities":[16,0,1,""],"ServiceProvider::getEntitiesNavBar":[16,0,1,""],"ServiceProvider::getLocaleLabels":[16,0,1,""],"ServiceProvider::getLocales":[16,0,1,""],"ServiceProvider::getTemplate":[16,0,1,""],"ServiceProvider::init":[16,0,1,""],"ServiceProvider::initChildren":[16,0,1,""],"ServiceProvider::initLocales":[16,0,1,""],"ServiceProvider::initMissingServiceProviders":[16,0,1,""],"ServiceProvider::register":[16,0,1,""],"ServiceProvider::setLocale":[16,0,1,""],"ServiceProvider::validateEntityDefinition":[16,0,1,""],"StreamedFileResponse::getStreamedFileFunction":[17,0,1,""],"TwigExtensions::formatDate":[18,0,1,""],"TwigExtensions::formatDateTime":[18,0,1,""],"TwigExtensions::formatFloat":[18,0,1,""],"TwigExtensions::formatTime":[18,0,1,""],"TwigExtensions::getLanguageName":[18,0,1,""],"TwigExtensions::registerTwigExtensions":[18,0,1,""],"UniqueValidator::getInvalidDetails":[19,0,1,""],"UniqueValidator::isValid":[19,0,1,""],"UniqueValidator::isValidUnique":[19,0,1,""],"UniqueValidator::isValidUniqueMany":[19,0,1,""],"YamlReader::$cachePath":[20,1,1,""],"YamlReader::__construct":[20,0,1,""],"YamlReader::getCacheFile":[20,0,1,""],"YamlReader::read":[20,0,1,""],"YamlReader::readFromCache":[20,0,1,""],"YamlReader::writeToCache":[20,0,1,""],AbstractData:[0,3,1,""],ControllerProvider:[1,3,1,""],DataFactoryInterface:[2,4,1,""],Entity:[3,3,1,""],EntityDefinition:[4,3,1,""],EntityDefinitionFactory:[5,3,1,""],EntityDefinitionFactoryInterface:[6,4,1,""],EntityDefinitionValidator:[7,3,1,""],EntityDefinitionValidatorInterface:[8,4,1,""],EntityEvents:[9,3,1,""],EntityValidator:[10,3,1,""],FileHandler:[11,3,1,""],ManyValidator:[12,3,1,""],MySQLData:[13,3,1,""],MySQLDataFactory:[14,3,1,""],ReferenceValidator:[15,3,1,""],ServiceProvider:[16,3,1,""],StreamedFileResponse:[17,3,1,""],TwigExtensions:[18,3,1,""],UniqueValidator:[19,3,1,""],YamlReader:[20,3,1,""]}},objnames:{"0":["php","method","PHP method"],"1":["php","attr","PHP attribute"],"2":["php","const","PHP const"],"3":["php","class","PHP class"],"4":["php","interface","PHP interface"]},objtypes:{"0":"php:method","1":"php:attr","2":"php:const","3":"php:class","4":"php:interface"},terms:{"12factor":30,"5px":32,"__construct":[3,4,10,11,13,14,20],"__dir__":[29,30,32,35],"_dir_":32,"abstract":[0,11,24,35],"b\u00fccher":24,"boolean":[0,1,3,4,9,10,11,13,18,19,21,24],"case":[0,4,13,22,24,25,26,29,32,36],"char":26,"class":[0,1,3,4,5,7,9,10,11,12,13,14,15,16,17,18,19,20,32],"default":[4,5,21,24,25,26,27,29],"float":[3,10,18,21,24],"function":[9,11,17,24,28,34],"int":[4,25,26,36],"long":9,"new":[0,1,4,6,13,22,29,30,32,33,34,35],"null":[0,1,3,4,9,13,16,18,20,25,26,28,29,30],"public":4,"return":[0,1,2,3,4,6,8,9,10,11,13,16,17,18,19,20,28],"static":[1,21],"switch":[4,21],"throw":[20,27],"true":[0,1,4,9,11,13,19,22,23,24,26,28,29,33],"void":[8,13],"while":29,abbrevi:31,abc:26,abl:31,about:[25,26,28],abov:26,absolut:20,access:[10,11,16,21],accord:[10,13,16,30],achiev:36,action:[1,9,11,16,21,28,31],activ:[1,4,13,24,25,26,29,33],actual:[0,10,35],adapt:21,add:[4,9,13,22,26,29,34,35,36],addchild:4,addev:22,addfilt:13,addit:[21,29],addon:21,addpagin:13,addsoftdeletiontoqueri:13,addsort:13,adjust:[33,36],admin:21,administr:31,advantag:29,after:[1,9,13,16,28,34],afterward:16,again:13,against:10,alert:32,alia:13,all:[0,1,4,10,11,13,16,18,22,24,25,26,29,31,32,35,36],allow:[24,26,29],along:24,alreadi:32,also:32,alter:26,although:35,alwai:[24,26,31],amazon:21,amet:26,amount:[0,4,13,25],andwher:13,ani:[0,9,13,22,29,30],anoth:[9,24,32],anymor:30,anyth:27,apach:21,api:[21,22,24],app:[1,16,18,22,27,28,29,30,32,34,35,36],appear:4,applic:[1,16,18,22,30,31,32],appropri:[1,29],arg_fil:29,around:[22,29],arrai:[0,1,3,4,6,8,9,10,13,16,19,20,22,29,30,32,35],arround:3,ascend:[0,4,13,24,29],assign:0,assum:[25,29,32],attent:[26,29],author:[23,24,25,26,29],auto:[21,22],auto_incr:25,automat:22,autor:29,avail:[9,16,18,20,21,25,26,28,30,35],awar:11,awss3adapt:30,awss3v3:30,azur:30,back:[22,26],bar:[4,16,21,24,26],base:[26,29],basic:31,befor:[0,9,11,13,27,28,32,34],behaviour:[24,33],belong:[0,4,13,26],below:24,benefici:29,besid:25,best:16,between:[26,29],big:[29,30],bigger:29,bigint:26,bit:[27,29],block:[32,36],blue:26,bodi:32,book:[23,24,25,26,29,32,35,36],book_ibfk_1:26,booklist:36,bool:[4,11,13,14,36],booleanfield:36,boolfield:36,boot:16,bootstrap:32,bore:29,both:[23,29],bottom:32,box:0,bring:11,broke:9,broken:26,btn:32,buch:29,bucket:30,build:[0,1,10,24,25],builder:13,buildupdata:10,builduplistfilt:1,builduprul:10,bunch:34,button:[26,32,36],cach:[16,20,21],cachepath:20,call:[9,16,24,30,32],can:[2,9,23,24,26,28,29,30,32,33,36],cancel:28,care:35,cascad:[0,13,21],caus:[1,24],certain:[16,28,32],chain:9,chang:[24,29,36],chapter:[22,25,26,29,31,32,35],charact:26,charset:[26,35],check:[0,4,10,12,13,15,19,33],checkfieldnam:4,child:4,children:[0,4,13,16,21,24],childrenlabelfield:[4,24,26],choic:[25,26],chosen:26,clear:28,click:26,clickabl:26,client:30,close:32,closur:[9,11,17,28],code:[1,18,28],color:26,column:[24,25,29,36],com:[26,30],combin:21,come:[31,32,35],compar:33,compon:34,compos:[30,35],comprehens:26,condit:[0,13],configur:[13,16,22,30,31],configuredefinit:16,connect:[1,13,14,22],consetetur:26,constant:[0,13],constraint:[10,19,21],construct:[2,11],constructor:[3,4,10,11,13,14,20],contain:[0,4,10,11,13,16,18,29],content:[20,21,23,26],continu:[25,29],control:[1,2,22,23,25,35],controllercollect:1,controllerproviderinterfac:1,convert:[3,22],copi:30,cost:27,could:29,count:[0,10,24],countbi:[0,13],cours:3,cover:24,creat:[0,1,2,4,6,9,11,13,16,24,25,26,28,29,31,32,34,35,36],created_at:[0,4,6,13,24,25,29],createdata:[2,14],createdefinit:16,createempti:[0,13],createentitydefinit:[5,6],createfil:[11,28],creation:[0,1,6,13,21,22,25,28],credenti:30,cross:[24,26],crud:[1,4,5,6,8,16,21,22],crudcreat:34,cruddata:1,cruddatafactoryinterfac:29,cruddelet:34,cruddeletefil:34,crudedit:34,crudfilecachingdirectori:16,crudlexentitydefinitionvalidatorinterfac:27,crudlexsampl:25,crudlexus:21,crudlist:34,crudmysqldata:29,crudrenderfil:34,crudsetlocal:34,crudshow:34,crudstat:34,crudusersetup:22,css:[29,32,34],current:[0,1,4,6,13,16,18,23,26,29,30,33,35],cursor:32,custom:21,cut:26,danger:32,data:[0,1,2,3,4,7,8,10,11,13,16,19,20,21],databas:[2,3,13,14,23,24,25,26,28,29,31,33,35],datafactori:[29,30,35],datasourc:[0,13],date:[10,18,21,24],datefield:36,datepick:32,datetim:[10,18,21,22,24,25],datetimefield:36,datetimepick:32,dbal:[13,14],dbname:35,debug:27,decim:26,declar:[4,25,26],defens:26,defin:[0,4,13,16,18,23,25,26,28,32,35],definit:[0,1,2,3,4,7,8,10,11,13,14,16,21,23],definitionschema:7,delet:[0,1,4,9,11,13,21,24,25],deletecascad:[0,4,13,24,26],deletechildren:[0,13],deleted_at:[4,13,25,29],deletefil:[1,11,28],deletemanytomanyrefer:13,deletion_failed_ev:[0,13],deletion_failed_still_referenc:[0,13],deletion_success:[0,13],depend:[3,16],deriv:29,descend:[0,13,24,29],describ:[21,22,25,26,31],descript:[21,22,24],desir:[16,18,22,29,32],detail:[1,4,24,26,29,31],determin:16,differ:26,direct:29,directli:[25,28,29,36],directori:[16,20,29,30],disabl:29,discuss:35,dismiss:32,displai:[4,18,21,24,25,26],div:32,doc:22,docreat:[0,13],doctrin:[13,14],doctrineserviceprovid:35,dodelet:[0,13],doesn:[26,28,29,33],dolor:26,don:[4,26,32,36],done:30,dot:[26,32],doubl:[18,26],doupdat:[0,13],drawback:30,driver:21,dropbox:30,dropdown:[0,24],due:[0,13],dure:5,each:[11,13,16,22,25,29,31,32,33,36],ead:31,earth:24,easi:[21,23,31],easili:[29,30],edit:[1,4,24,26,31,32,33,36],editor:[24,26],editpag:29,effect:18,either:[1,9,16,23,24,26],element:[4,26],elet:31,els:[0,3,18,26,29,33],email:22,empti:[0,13,18],enabl:24,end:24,endblock:32,endfor:32,endif:32,engin:26,enrich:[0,13],enrichentitywithmetadata:[0,13],enrichwithmani:13,enrichwithmanyfield:13,enrichwithrefer:13,enter:24,entiti:[0,1,2],entitydefinit:[0,1,2,3],entityev:0,entitynam:11,entiydefinitionfactoryinterfac:5,entri:[0,4,13,16,24,25,29,31],environ:27,equal:33,error:[1,10,24],etc:[26,31],even:28,event:[0,9,11,13,21,22],everi:[21,28,29],everyth:19,exact:25,exactli:[0,31],exampl:[0,3,18,23,25,26,28,29,30,32,34,35,36],except:[20,27],exclud:[0,4],excludedelet:[0,13],excludeid:[0,13],execut:[9,11,28],exist:[0,4,11,13,16,20,23,25,33,36],exlud:4,expect:1,expectedvers:10,explain:24,extend:21,extens:18,extract:[0,13],factori:[1,14,30],fail:[0,1,10,13,18],fall:26,fals:[0,1,4,9,13,14,18,22,24,26,28,29,33],far:[25,36],faster:33,featur:[21,22,24],fetch:[13,34],fetchreferencesforfield:13,few:26,field:[0,1,3,4,5,6,10,11,13,19,21,22,23,24],fieldconstraintstorul:10,fieldlabel:36,fieldnam:4,fieldprefix:13,fieldstructur:6,fieldtypetorul:10,file:[1,2,4,11,16,17,20,21,24],filecachingdirectori:29,filefield:36,fileinfo:21,filenam:[17,20],filesystem:[0,2,11,13,14,21,26],filesysteminterfac:[0,2,11,13,14,30],fill:[23,26],filter:[0,1,4,13,18,21,24],filteract:1,filteroper:[0,1,13],filtertous:1,find:36,fire:9,firewal:22,first:[9,13,20,22,25,28,29,30,32,35],fit:16,fix:[0,13,21,24],fixedfield:36,flag:[13,14,29],flash:[1,24,32],flashbag:32,flashtyp:32,flashtypeavail:32,flexibl:[6,31],floatfield:36,floatstep:[24,26],flush:34,flysystem:30,folder:[29,32],follow:[22,26,32,35],foo:26,footer:[32,36],forc:26,foreign:21,forget:26,form:[0,13,21,24,26],format:18,formatd:18,formatdatetim:18,formatfloat:18,formattim:18,found:[1,4],free:29,from:[0,3,8,10,11,13,16,20,21,22,24,26,28,29],frontpag:24,ftp:30,fulfil:0,full:[0,9,26],fullfil:0,further:[26,35],futur:[24,35],gener:[1,13,17,21,22,31,32],generateuuid:13,get:[0,1,3,4,13,16,18,20,22,25,26,28,29,30,32,34],getafterdeleteredirectparamet:1,getcachefil:20,getchildren:4,getchildrenlabelfield:4,getdata:[16,22,28],getdefinit:[0,3,13],geteditablefieldnam:4,getent:16,getentitiesnavbar:16,getev:[0,13,28],getfield:4,getfieldlabel:4,getfieldnam:4,getfilt:4,getfilteredfieldnam:4,getformfield:[0,13],getidtonamemap:[0,13],getinitialsortfield:4,getinvaliddetail:[12,15,19],getlabel:4,getlanguagenam:18,getlistfield:4,getlocal:[4,16],getlocalelabel:16,getmanyfield:[0,13],getmanyid:13,getnavbargroup:4,getnotfoundpag:1,getpages:4,getpath:11,getpublicfieldnam:4,getraw:3,getreadonlyfield:4,getreferenceid:[0,13],getserviceprovid:4,getstreamedfilefunct:17,getsubtypefield:4,gettabl:4,gettempl:16,getter:[16,22],gettoken:22,gettyp:4,give:[26,36],given:[0,3,4,5,7,8,9,10,11,13,16,17,18,20,24,26,28],global:21,goe:20,gone:26,good:[16,25,31,32,36],got:[25,29],grab:22,green:26,gridf:30,group:[4,16,21],guid:[29,35],had:26,hand:[2,6,27,29,30],handl:[1,11,21,26,28],hard:[4,21,24,25],harddelet:[4,24,29],haschildren:13,hash:[22,28],hasmanyset:[0,13],hasoptimisticlock:4,have:[0,9,13,22,23,24,25,26,29,31,32,35,36],head:32,header:[11,32,36],here:[11,22,24,25,26,29,30,34],hide:25,hideid:[24,26],hierarchi:32,him:22,hint:[4,21],hold:[0,1,3,4,9,11,13,14,16],homepag:24,host:35,how:[3,24,28,29,32,34],html:26,http:[1,11,25,26,30,35],httpfoundat:34,hydrat:[0,13],i18n:[1,21],ident:24,idtodata:13,imag:[26,30],impact:29,implement:[1,2,3,5,13,14,16,21,25,26],implicit:4,includ:[0,4,11,13,21,30,32],includemani:4,increment:21,index:[21,26,30],inform:[25,29],inheritdoc:[5,7,12,13,14,15,19],init:16,initchildren:16,initi:[4,16,21,22,24],initialsortascend:[4,24,29],initialsortfield:[4,24,29],initlocal:16,initmissingserviceprovid:16,innodb:26,input:[1,3],inset:10,instanc:[0,1,2,4,6,10,11,13,14,16,22,32,35],instanti:22,instead:[21,28],instruct:24,integ:[0,1,3,4,10,13,21,24,25],integerfield:36,interfac:[2,6,8,22,27],intern:[4,20,22,29,35,36],interrupt:28,intfield:36,introduct:21,invalid:[1,3,4,16,29],ipsum:26,isdeletecascad:4,isharddelet:4,isinitialsortascend:4,isn:13,isopenonsundai:24,isutc:18,isvalid:[12,15,19],isvaliduniqu:19,isvaliduniquemani:19,item:[4,24,25,26],itself:[32,35],javascript:32,jqueri:32,json:35,just:[4,6,11,23,26,29,32,36],kei:[0,3,4,5,6,10,13,14,16,21,24,25],kept:35,know:34,known:32,label:[4,5,6,16,21,22,23,24,25,26],label_:29,label_d:[24,29],lambda:17,languag:[18,24],larg:24,last:[25,26,28],later:35,latest:[9,30],layer:35,layout:[16,21],lead:26,leagu:30,learn:[24,29],least:1,let:[22,25],level:[24,29,32],lib:[23,26,30],librari:[22,23,24,25,26,28,29,30,33],librarybook:[24,26],librarybook_ibfk_1:26,librarybook_ibfk_2:26,like:[0,3,4,6,11,13,16,18,22,24,26,28,29,32,34,35,36],line:[24,26],linebreak:26,link:[25,29,32,34],list:[0,1,4,16,21,24,26,28],listentri:[0,1,13],listfield:[4,24,29],listview:[4,29],local:[1,4,6,16,29,30,34],locale_fallback:29,localelabel:[4,5,6],localeserviceprovid:29,locat:29,lock:[1,4,10,21,24,25],log:21,longer:[24,26],longtext:26,look:[3,32],lorem:26,lost:33,lot:31,luckili:30,mail:[22,28],main:24,make:[6,26,29],manag:[2,9,21,22],managei18n:29,mandatori:23,mani:[0,4,12,13,19,21,22,24],manipul:11,manual:21,manyfield:13,map:[1,10,13,16],margin:32,mark:29,matter:3,maximum:[0,13],mean:[26,33],meant:22,mechan:[25,29],medium:24,mediumint:26,mediumtext:26,memori:30,menu:32,messag:25,metadata:[0,13],metayaml:7,method:[1,13],middlewar:21,might:[13,18,22,24,26,27,28,29,31],mimetyp:11,minim:[25,31,35],miss:16,mitig:29,mix:[0,1,3,4,13],mode:1,modif:[1,28],modifi:[28,29],modifyent:1,modifyfilesandsetflashbag:1,moment:[9,28,32],more:[22,25,26,28,29,30,32,35],most:[31,32],mount:[25,29,34,35],mountpath:29,much:[26,29],multi:[24,26],multilin:[21,24],multilinefield:36,must:[0,4,9,24,28],myauthor:29,mybooklayout:32,mycreatebooklayout:32,mycustomvalid:27,mylayout:32,myownentitydefinitionfactori:29,myshowlayout:32,mysql:[13,21,25],mysqldata:0,mysqldatafactori:2,name:[0,1,4,11,13,16,18,23,24,25,26,29,31,32,33,34,35],namefield:[0,13,22,23,24,26],nav:4,navbargroup:[4,24,29],navig:[4,16,21,24,25],need:[16,22,23,24,26,29,31,32,33,36],neither:33,net:30,newli:[0,2,11,13],next:[20,29,31,35],nginx:21,nor:33,notat:18,note:[23,25,29,36],noth:[4,16],now:[25,26,33,35],number:[24,29],object:[3,28,35],occur:24,off:[16,21],offer:[1,4,16,22,29,31],often:[29,31],onc:24,onli:[1,4,10,24,25,26,29,31,35],opcod:29,open:24,oper:[0,1,22],optimist:[1,4,10,21,24,25],optimisticlock:[1,4,24,33],option:[0,24,26,29,35],order:[0,4,9,16,22,26,28,29,32],origin:20,other:[4,26,33],otherent:26,othernam:26,our:[23,25,26],output:[11,17],over:30,overrid:21,overridden:30,overview:24,own:[0,21,27],packag:29,page:[1,4,21,24,25,26],pages:[4,24,29],pagin:[13,21],pai:26,pair:3,panel:21,param:[0,13],paramet:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,28],paramsoper:[0,13],parent:[24,26],pars:[8,16,18,29],part:[22,36],pass:[3,10,11,29],password:21,password_reset:22,passwordreset:22,path:[11,20,24,25,26,29,30,32],pattern:18,pdate:31,pecl:21,per:[4,23,25,29],perform:[0,10,11,13,19,22,27,29],performonfil:11,persist:[0,13],person:33,philiplb:[29,32,35],php:[20,21,26,29,30],phpcr:30,physic:26,picker:32,place:[25,32],planet:24,plu:[22,32],point:[9,13,24,27,31,32,36],pointer:32,pop:[9,28],popul:[3,22],populateviarequest:3,possibl:[13,24,26,27,29],post:[1,34],postprocess:1,precis:24,predefin:24,prefil:[0,13],prefix:[13,32],prepend:32,prepopul:21,present:[24,29],previou:25,price:24,primari:[13,14,21],process:[9,30],processor:24,produc:26,product:27,profil:21,project:[22,25,29],proper:26,properti:[0,3,4,9,10,11,13,14,16,20,24,32],protect:[0,3,4,9,10,11,13,14,16,20],provid:[2,4,6,10,16,18,22,27,29,32,35],push:[9,28],put:24,qsa:29,queri:13,query_str:29,querybuild:13,quick:[10,31],rackspac:30,raw:[0,3,10,13],react:28,read:[0,4,20],readabl:22,readfromcach:20,real:26,reat:31,receiv:11,recommend:[22,26,32],red:26,redirect:[1,29],redirectpag:1,refer:[0,1,4,10,13,15,21,22,23],referenc:[4,13,24,26,29],referencefield:36,region:30,regist:[16,18,22,27,28,29,30,32,35],registertwigextens:18,registr:[5,6,29],regular:19,reject:33,rel:26,relat:[13,24,26,29],relationship:[24,26],releas:24,reli:35,remov:[9,26,28],render:[1,11,32,36],renderfield:36,renderfil:[1,11],replac:26,replicateadapt:30,repres:[3,24,26,29],request:[1,3,11,29,34],request_filenam:29,requir:[10,21,22,23,24,30,35],reset:21,resolv:32,resourc:[1,29,34],respons:[1,11,17],rest:[26,36],result:[0,18],retriev:0,rewritecond:29,rewriterul:29,right:16,romaricdrigon:7,root:[30,36],rout:[1,21,29],row:[0,3,13,23,24,25,29],rule:10,s3client:30,sadipsc:26,sai:[3,25],salt:22,same:[0,4,13,23,25,31],sampl:[25,26],save:[1,13,26,28],savemani:13,scientif:18,scratch:21,search:[21,29],second:[22,25],secret:30,section:[16,32,35],secur:22,securityserviceprovid:22,see:[22,25,26,30],seiten:29,select:[0,24,26,36],sens:[26,29],sent:33,serv:[1,21],servic:[2,4,6,16,27,30,32],serviceprovid:[2,4,5,6],serviceproviderinterfac:16,session:32,set:[0,1,3,4,9,10,11,13,16,21,22,24],setchildrenlabelfield:4,setdeletecascad:4,setfield:[4,36],setfieldlabel:4,setfilt:4,setharddelet:4,setinitialsortascend:4,setinitialsortfield:4,setlabel:4,setlistfield:4,setlocal:[1,4,16],setmethod:13,setnavbargroup:4,setoptimisticlock:4,setpages:4,setserviceprovid:4,settabl:4,settyp:4,setup:[1,16,18,21,26,28,29,31],setupi18n:1,setuprout:1,setuptempl:1,setvalidationfailedflash:1,setvalu:13,setvaluesandparamet:13,sever:22,sftp:30,shorten:[18,26],should:[0,4,11,20,23,24,27,28,32,35],shouldexecut:9,shouldwritefil:11,show:[1,16,21],showlist:1,shown:26,side:[24,26],signatur:[9,28],silex:[1,16,21,22,29,31,32,35],silexcontrollercollect:1,simpl:[20,25,29],simpli:[22,29,36],singl:[1,3,4,10,21,24,25,26],sit:26,situat:28,size:[11,24,26],skip:[0,13],small:[17,24,25],smallint:26,soft:[0,13,24,25,29],solut:29,some:[13,22,24,25,29,31,32],someon:[28,33],someth:28,sometim:29,somewher:29,sort:[0,4,13,21,24,26],sortascend:[0,13],sortfield:[0,13],sourc:[4,24],space:26,special:29,specif:[3,11,24,29,32,34],specifi:[0,4,36],sql:25,src:[29,32,36],stand:31,standard:[17,32],standardfieldlabel:[4,5,6],start:[24,31,32,36],state:4,stateless:30,staticfil:1,statu:1,step:[24,26],still:[13,26,31],stop:9,storag:21,store:[1,4,11,16,24,26,28,30,35],stream:[11,17],streamedrespons:11,string:[0,1,3,4,6,9,10,11,13,16,17,18,20,25,29],structur:[4,20,21],stuff:34,sub:[0,4,13,22,24],subchapt:32,subchildren:0,subfold:26,submiss:33,submit:33,subset:0,subtyp:4,success:[0,9,11,13,32],superset:0,support:[23,26,29,35],sure:27,surround:22,symfoni:[22,34],symfonycomponenthttpfoundationredirectrespons:1,system:[11,16],tabl:[0,4,5,6,13],tag:32,take:[3,11,24,28,35],taken:[24,30],tediou:31,templat:[1,16,21,32,35],test:30,text:[21,22,23,24,25],textfield:36,than:[26,29],thatfield:[22,24,26],thatid:[0,13],thei:[4,9,26,28,36],them:[13,20,22,34],thi:[1,2,3,4,9,10,11,13,16,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],thing:10,think:26,thisfield:[22,24,26],those:[26,33,36],though:[26,29],three:[4,26,28],through:35,time:[18,24,25,26,28,35],timestamp:[25,26],timestr:18,timezon:18,tinyint:26,tinytext:26,titel:[24,29],titl:[23,24,25,26,29],token:22,token_storag:22,told:25,too:[0,11,29],tooltip:[26,32],top:[24,29],totyp:3,toward:4,translat:[21,26],translationserviceprovid:29,tri:18,try_fil:29,turn:21,tweak:36,twig:[16,18,32,36],twigserviceprovid:32,two:[22,23,25,29,33],txt:26,type:[0,3,4,10,19,21,22,23,24,25],unchang:18,under:[25,29,30],underli:30,uniqu:[10,19,22,23,24],until:26,unus:24,upcom:13,updat:[0,1,9,11,13,25,28,33,34],update_at:29,updated_at:[0,4,6,13,24,25,29],updatefil:[11,28],upload:[1,2,11,21,24,26,30],url:[21,24,25],urlfield:36,usag:[29,30],useful:3,user:[2,21],userbas:22,usernam:22,userprovid:21,userrol:22,usersetup:22,useuuid:[13,14],usual:30,utc:[18,25],utf8:[26,35],util:17,uuid:[13,14,21],valid:[1,3,7,8,10,12,15,16,19,21,25],validateentitydefinit:[16,27],valu:[0,3,4,10,12,13,15,18,19,21,22,23,24,26],varchar:[26,29],vari:31,variat:2,variou:[25,32],vendor:[29,32],version:[0,4,10,13,24,25,29,30,33],via:[4,6,18,21,26],view:[4,24,26,29,31,32,36],visit:29,visual:[24,26],wai:[30,35],want:[2,22,26,27,28,29,32,34,36],web:21,webdav:30,webserv:21,well:4,were:[4,28],what:[2,3,13,24,25,26,28],whatev:35,when:[4,24,25,29,32],whenev:31,where:[1,4,13,25,28,29,31,32],whether:[0,1,4,10,13,14,18,19,23,24],which:[1,4,8,13,17,18,20,24,26,28,34,35,36],who:11,whole:[16,28],within:26,without:[24,26],work:[30,36],workingdirectori:30,would:[25,26,29,32,33],writabl:[16,20,29],write:[0,11,13,20,30,31],writetocach:20,wrong:[20,27],www:26,wysiwym:[21,24],yaml:[4,6,16,20,21],yet:[16,29],yml:[7,8,16,22,25,26,27,29,30,35],you:[22,25,26,27,28,29,31,32,35,36],your:[16,21,22,25,26,27,28,29,30,31],yourcrud:[29,35],yourdbnam:35,yourdbpassword:35,yourdbus:35,yourhost:35,yourself:29,ziparch:30},titles:["CRUDlex\\AbstractData","CRUDlex\\ControllerProvider","CRUDlex\\DataFactoryInterface","CRUDlex\\Entity","CRUDlex\\EntityDefinition","CRUDlex\\EntityDefinitionFactory","CRUDlex\\EntityDefinitionFactoryInterface","CRUDlex\\EntityDefinitionValidator","CRUDlex\\EntityDefinitionValidatorInterface","CRUDlex\\EntityEvents","CRUDlex\\EntityValidator","CRUDlex\\FileHandler","CRUDlex\\ManyValidator","CRUDlex\\MySQLData","CRUDlex\\MySQLDataFactory","CRUDlex\\ReferenceValidator","CRUDlex\\ServiceProvider","CRUDlex\\StreamedFileResponse","CRUDlex\\TwigExtensions","CRUDlex\\UniqueValidator","CRUDlex\\YamlReader","Welcome to CRUDlex’s documentation!","Addons","Constraints","CRUD YAML Reference","Data Structure Definition","Data Types","Definition Validation","Events","Extended Features","File Handling","Introduction","Overriding Layouts","Optimistic Locking","Routes","Setup","Overriding Templates"],titleterms:{"boolean":26,"default":30,"float":26,"static":29,"switch":29,abstractdata:0,access:22,action:[32,36],adapt:30,addit:36,addon:22,admin:22,amazon:30,apach:29,auto:29,bar:29,cach:29,cascad:26,children:26,combin:29,constraint:23,content:29,controllerprovid:1,creation:29,crud:[24,29],crudlex:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],crudlexus:22,custom:27,data:[22,25,26],datafactoryinterfac:2,date:26,datetim:26,definit:[25,27],delet:[26,29],descript:29,displai:29,document:21,entiti:[3,25,29,32],entitydefinit:[4,29],entitydefinitionfactori:5,entitydefinitionfactoryinterfac:6,entitydefinitionvalid:7,entitydefinitionvalidatorinterfac:8,entityev:9,entityvalid:10,event:28,extend:29,featur:29,field:[25,29,36],file:[26,29,30],filehandl:11,filesystem:30,filter:29,fix:26,foreign:26,form:[29,36],from:32,global:32,group:29,handl:30,hard:29,hint:26,i18n:29,implement:[27,29],includ:36,increment:29,indic:21,initi:29,instead:29,integ:26,introduct:31,kei:[26,29],label:29,layout:[32,36],list:[29,34],lock:33,log:22,manag:29,mani:26,manyvalid:12,middlewar:34,multilin:26,mysql:26,mysqldata:13,mysqldatafactori:14,navig:29,nginx:29,off:[27,29],optimist:33,overrid:[30,32,36],own:[29,32],page:[29,36],pagin:29,panel:22,paramet:29,password:22,prepopul:29,primari:29,profil:29,refer:[24,26],referencevalid:15,reset:22,role:22,rout:34,scratch:32,serv:29,serviceprovid:16,set:[26,29],setup:35,show:26,singl:[32,36],sort:29,storag:30,streamedfilerespons:17,structur:25,tabl:21,templat:36,text:26,translat:29,turn:27,twigextens:18,type:26,uniquevalid:19,url:26,user:22,userprovid:22,uuid:29,valid:27,valu:29,via:29,web:29,webserv:29,welcom:21,wysiwym:26,yaml:[24,29],yamlread:20,your:32}}) \ No newline at end of file