Property | Type | Description | |
---|---|---|---|
$datas | Holds the {@see AbstractData} instances. | ||
$manageI18n | Holds whether we manage the i18n. |
Method | Description | |
---|---|---|
getData ( string $name ) : |
Getter for the {@see AbstractData} instances. | |
getEntities ( ) : string[] | Getter for all available entity names. | |
getLocales ( ) : array | Gets the available locales. | |
getTemplate ( Pimple\Container $app, string $section, string $action, string $entity ) : string | Determines the Twig template to use for the given parameters depending on the existance of certain keys in the Container $app in this order: | |
init ( crudlex\DataFactoryInterface $dataFactory, string $crudFile, crudlex\FileProcessorInterface $fileProcessor, boolean $manageI18n, Pimple\Container $app ) | Initializes the instance. | |
isManagingI18n ( ) : boolean | Gets whether CRUDlex manages the i18n system. | |
register ( Pimple\Container $app ) | Implements ServiceProviderInterface::register() registering $app['crud']. | |
setLocale ( string $locale ) | Sets the locale to be used. |
Method | Description | |
---|---|---|
configureDefinition ( |
Configures the EntityDefinition according to the given CRUD entity map. | |
createDefinition ( Pimple\Container $app, array $locales, array $crud, string $name ) : |
Creates and setups an EntityDefinition instance. | |
getLocaleLabels ( array $locales, array $crud ) : array | Gets a map with localized entity labels from the CRUD YML. | |
initChildren ( ) | Initializes the children of the data entries. | |
initLocales ( Pimple\Container $app ) : array | Initializes the available locales. | |
initMissingServiceProviders ( Pimple\Container $app ) | Initializes needed but yet missing service providers. | |
readYaml ( string $fileName ) : array | Reads and returns the contents of the given Yaml file. If it goes wrong, it throws an exception. | |
validateEntityDefinition ( Pimple\Container $app, array $entityDefinition ) | Validates the parsed entity definition. |
protected configureDefinition ( |
||
$definition | the definition to configure | |
$crud | array | the CRUD entity map |
protected createDefinition ( Pimple\Container $app, array $locales, array $crud, string $name ) : |
||
$app | Pimple\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 |
return | the EntityDefinition good to go |
public getEntities ( ) : string[] | ||
return | string[] | a list of all available entity names |
public getLocales ( ) : array | ||
return | array | the available locales |
public getTemplate ( Pimple\Container $app, string $section, string $action, string $entity ) : string | ||
$app | Pimple\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 |
return | string | the best fitting template |
public init ( crudlex\DataFactoryInterface $dataFactory, string $crudFile, crudlex\FileProcessorInterface $fileProcessor, boolean $manageI18n, Pimple\Container $app ) | ||
$dataFactory | crudlex\DataFactoryInterface | the factory to create the concrete AbstractData instances |
$crudFile | string | the CRUD YAML file to parse |
$fileProcessor | crudlex\FileProcessorInterface | the file processor used for file fields |
$manageI18n | boolean | holds whether we manage the i18n |
$app | Pimple\Container | the application container |
protected initChildren ( ) |
protected initLocales ( Pimple\Container $app ) : array | ||
$app | Pimple\Container | the application container |
return | array | the available locales |
protected initMissingServiceProviders ( Pimple\Container $app ) | ||
$app | Pimple\Container | the application container |
public isManagingI18n ( ) : boolean | ||
return | boolean | true if CRUDlex manages the i18n system |
public register ( Pimple\Container $app ) | ||
$app | Pimple\Container | the Container instance of the Silex application |
protected validateEntityDefinition ( Pimple\Container $app, array $entityDefinition ) | ||
$app | Pimple\Container | the application container |
$entityDefinition | array | the entity definition to validate |