PHP Класс sfPropelFormGenerator, sfPropelORMPlugin

This class generates a Propel forms.
Автор: Fabien Potencier ([email protected])
Наследование: extends sfGenerator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$dbMap

Открытые методы

Метод Описание
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 )

Защищенные методы

Метод Описание
loadBuilders ( ) Loads all Propel builders.

Описание методов

generate() публичный Метод

Generates classes and templates in cache.
public generate ( array $params = [] ) : string
$params array The parameters
Результат string The data to put in configuration cache

getColumnNameMaxLength() публичный Метод

Returns the maximum length for a column name.
public getColumnNameMaxLength ( ) : integer
Результат integer The length of the longer column name

getForeignKeyNames() публичный Метод

This method does not returns foreign keys that are also primary keys.
public getForeignKeyNames ( ) : array
Результат 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() публичный Метод

Returns the foreign table associated with a column.
public getForeignTable ( ColumnMap $column ) : TableMap
$column ColumnMap A ColumnMap object
Результат TableMap A TableMap object

getI18nModel() публичный Метод

Returns the i18n model name for the current table.
public getI18nModel ( ) : string
Результат string The model class name

getManyToManyTables() публичный Метод

A table is considered to be a m2m table if it has 2 foreign keys that are also primary keys.
public getManyToManyTables ( ) : array
Результат array An array of tables.

getPrimaryKey() публичный Метод

Returns the first primary key column of the current table.
public getPrimaryKey ( ) : ColumnMap
Результат ColumnMap A ColumnMap object

getPrimaryKeyColumNames() публичный Метод

Returns an array of primary key column names.
public getPrimaryKeyColumNames ( ) : array
Результат array An array of primary key column names

getPrimaryKeyColumNamesAsString() публичный Метод

Returns a PHP string representation for the array of all primary key column names.
См. также: getPrimaryKeyColumNames()
public getPrimaryKeyColumNamesAsString ( ) : string
Результат string A PHP string representation for the array of all primary key column names

getUniqueColumnNames() публичный Метод

getValidatorClassForColumn() публичный Метод

Returns a sfValidator class name for a given column.
public getValidatorClassForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Результат string The name of a subclass of sfValidator

getValidatorOptionsForColumn() публичный Метод

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
Результат string The options to pass to the validator as a PHP string

getWidgetClassForColumn() публичный Метод

Returns a sfWidgetForm class name for a given column.
public getWidgetClassForColumn ( ColumnMap $column ) : string
$column ColumnMap A ColumnMap object
Результат string The name of a subclass of sfWidgetForm

getWidgetOptionsForColumn() публичный Метод

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
Результат string The options to pass to the widget as a PHP string

initialize() публичный Метод

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

isI18n() публичный Метод

Returns true if the current table is internationalized.
public isI18n ( ) : boolean
Результат boolean true if the current table is internationalized, false otherwise

loadBuilders() защищенный Метод

Loads all Propel builders.
protected loadBuilders ( )

translateColumnName() публичный Метод

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

underscore() публичный Метод

public underscore ( $name )

Описание свойств

$dbMap защищенное свойство

protected $dbMap