class EmberModelGenerator extends Generator

Class EmberModelGenerator - converts Entity to Ember model

Methods

__construct(DisconnectedClassMetadataFactory $classMetadataFactory, string $pluginRootDir)

EmberModelGenerator constructor.

generate()

Convert entity to ember model and save to file

setSkeletonDirs(array $skeletonDirs)

Sets an array of directories to look for templates.

string
getEmberDataFieldType(string $type)

Mapping properties

string
getModelName(string $name)

Create Ember model name

string
getEmberDataAssociationType(array $associationMapping)

Get associated mapping

Details

at line 60
__construct(DisconnectedClassMetadataFactory $classMetadataFactory, string $pluginRootDir)

EmberModelGenerator constructor.

Parameters

DisconnectedClassMetadataFactory $classMetadataFactory
string $pluginRootDir

at line 71
generate()

Convert entity to ember model and save to file

Exceptions

Exception

at line 160
setSkeletonDirs(array $skeletonDirs)

Sets an array of directories to look for templates.

The directories must be sorted from the most specific to the most directory.

Parameters

array $skeletonDirs An array of skeleton dirs

at line 173
protected string getEmberDataFieldType(string $type)

Mapping properties

Parameters

string $type

Return Value

string

at line 193
protected string getModelName(string $name)

Create Ember model name

Parameters

string $name

Return Value

string

at line 208
protected string getEmberDataAssociationType(array $associationMapping)

Get associated mapping

Parameters

array $associationMapping

Return Value

string