PHP Class sfPropelFormGenerator, sfPropelORMPlugin

This class generates a Propel forms.
Author: Fabien Potencier ([email protected])
Inheritance: extends sfGenerator
Afficher le fichier Open project: propelorm/sfPropelORMPlugin Class Usage Examples

Protected Properties

Свойство Type Description
$dbMap

Méthodes publiques

Méthode Description
generate ( array $params = [] ) : string Generates classes and templates in cache.
getColumnNameMaxLength ( ) : integer Returns the maximum length for a column name.
getForeignKeyNames ( ) : array Returns PHP names for all foreign keys of the current table.
getForeignTable ( ColumnMap $column ) : TableMap Returns the foreign table associated with a column.
getI18nModel ( ) : string Returns the i18n model name for the current table.
getManyToManyTables ( ) : array Returns an array of tables that represents a many to many relationship.
getPrimaryKey ( ) : ColumnMap Returns the first primary key column of the current table.
getPrimaryKeyColumNames ( ) : array Returns an array of primary key column names.
getPrimaryKeyColumNamesAsString ( ) : string Returns a PHP string representation for the array of all primary key column names.
getUniqueColumnNames ( )
getValidatorClassForColumn ( ColumnMap $column ) : string Returns a sfValidator class name for a given column.
getValidatorOptionsForColumn ( ColumnMap $column ) : string Returns a PHP string representing options to pass to a validator for a given column.
getWidgetClassForColumn ( ColumnMap $column ) : string Returns a sfWidgetForm class name for a given column.
getWidgetOptionsForColumn ( ColumnMap $column ) : string Returns a PHP string representing options to pass to a widget for a given column.
initialize ( sfGeneratorManager $generatorManager ) Initializes the current sfGenerator instance.
isI18n ( ) : boolean Returns true if the current table is internationalized.
translateColumnName ( $column, $related = false, $to = BasePeer::TYPE_FIELDNAME )
underscore ( $name )

Méthodes protégées

Méthode Description
loadBuilders ( ) Loads all Propel builders.

Method Details

generate() public méthode

Generates classes and templates in cache.
public generate ( array $params = [] ) : string
$params array The parameters
Résultat string The data to put in configuration cache

getColumnNameMaxLength() public méthode

Returns the maximum length for a column name.
public getColumnNameMaxLength ( ) : integer
Résultat integer The length of the longer column name

getForeignKeyNames() public méthode

This method does not returns foreign keys that are also primary keys.
public getForeignKeyNames ( ) : array
Résultat array An array composed of: * The foreign table PHP name * The foreign key PHP name * A Boolean to indicate whether the column is required or not * A Boolean to indicate whether the column is a many to many relationship or not

getForeignTable() public méthode

Returns the foreign table associated with a column.
public getForeignTable ( ColumnMap $column ) : TableMap
$column ColumnMap A ColumnMap object
Résultat TableMap A TableMap object

getI18nModel() public méthode

Returns the i18n model name for the current table.
public getI18nModel ( ) : string
Résultat string The model class name

getManyToManyTables() public méthode

A table is considered to be a m2m table if it has 2 foreign keys that are also primary keys.
public getManyToManyTables ( ) : array
Résultat array An array of tables.

getPrimaryKey() public méthode

Returns the first primary key column of the current table.
public getPrimaryKey ( ) : ColumnMap
Résultat ColumnMap A ColumnMap object

getPrimaryKeyColumNames() public méthode

Returns an array of primary key column names.
public getPrimaryKeyColumNames ( ) : array
Résultat array An array of primary key column names

getPrimaryKeyColumNamesAsString() public méthode

Returns a PHP string representation for the array of all primary key column names.
See also: getPrimaryKeyColumNames()
public getPrimaryKeyColumNamesAsString ( ) : string
Résultat string A PHP string representation for the array of all primary key column names

getUniqueColumnNames() public méthode

getValidatorClassForColumn() public méthode

Returns a sfValidator class name for a given column.
public getValidatorClassForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Résultat string The name of a subclass of sfValidator

getValidatorOptionsForColumn() public méthode

Returns a PHP string representing options to pass to a validator for a given column.
public getValidatorOptionsForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Résultat string The options to pass to the validator as a PHP string

getWidgetClassForColumn() public méthode

Returns a sfWidgetForm class name for a given column.
public getWidgetClassForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Résultat string The name of a subclass of sfWidgetForm

getWidgetOptionsForColumn() public méthode

Returns a PHP string representing options to pass to a widget for a given column.
public getWidgetOptionsForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Résultat string The options to pass to the widget as a PHP string

initialize() public méthode

Initializes the current sfGenerator instance.
public initialize ( sfGeneratorManager $generatorManager )
$generatorManager sfGeneratorManager A sfGeneratorManager instance

isI18n() public méthode

Returns true if the current table is internationalized.
public isI18n ( ) : boolean
Résultat boolean true if the current table is internationalized, false otherwise

loadBuilders() protected méthode

Loads all Propel builders.
protected loadBuilders ( )

translateColumnName() public méthode

public translateColumnName ( $column, $related = false, $to = BasePeer::TYPE_FIELDNAME )

underscore() public méthode

public underscore ( $name )

Property Details

$dbMap protected_oe property

protected $dbMap