symfony API

sfDoctrineFormGenerator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.2 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

Doctrine form generator.

Inheritence

sfDoctrineFormFilterGenerator  <  sfDoctrineFormGenerator  <  sfGenerator

Method Summary

Methods inherited from sfGenerator

evalTemplate , generate , generatePhpFiles , getGeneratedModuleName , getGeneratorClass , getGeneratorManager , getModuleName , getTheme , initialize , replacePhpMarks , setGeneratedModuleName , setGeneratorClass , setModuleName , setTheme , __construct

Method Details

  • (string) arrayExport ($values)

    $values

    Array export. Export array to formatted php code

  • (string) generate ($params = array())

    $params The parameters

    Generates classes and templates in cache.

    returns The data to put in configuration cache

  • (integer) getColumnNameMaxLength ()

    Returns the maximum length for a column name.

    returns The length of the longer column name

  • (array) getColumns ()

    Get array of sfDoctrineColumn objects

  • (array) getForeignKeyNames ()

    Returns PHP names for all foreign keys of the current table.


    This method does not returns foreign keys that are also primary keys.

    returns 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

  • (string) getI18nModel ()

    Returns the i18n model name for the current table.

    returns The model class name

  • (array) getManyToManyRelations ()

    Returns an array of relations that represents a many to many relationship.


    A table is considered to be a m2m table if it has 2 foreign keys that are also primary keys.

    returns An array of relations.

  • (array) getPluginModels ()

    Get all the models which are a part of a plugin and the name of the plugin.


    The array format is modelName => pluginName

  • (string) getPluginNameForModel ($modelName)

    $modelName

    Get the name of the plugin a model belongs to

  • getPrimaryKey ((ColumnMap) 0)

    0 A ColumnMap object

    Returns the first primary key column of the current table.

  • (array) getPrimaryKeyColumNames ()

    Returns an array of primary key column names.

    returns An array of primary key column names

  • (string) getPrimaryKeyColumNamesAsString ()

    Returns a PHP string representation for the array of all primary key column names.

    returns A PHP string representation for the array of all primary key column names

  • getUniqueColumnNames ()

  • (string) getValidatorClassForColumn ((sfDoctrineColumn) $column)

    $column

    Returns a sfValidator class name for a given column.

    returns The name of a subclass of sfValidator

  • (string) getValidatorOptionsForColumn ((sfDoctrineColumn) $column)

    $column

    Returns a PHP string representing options to pass to a validator for a given column.

    returns The options to pass to the validator as a PHP string

  • (string) getWidgetClassForColumn ((sfDoctrineColumn) $column)

    $column

    Returns a sfWidgetForm class name for a given column.

    returns The name of a subclass of sfWidgetForm

  • (string) getWidgetOptionsForColumn ((sfDoctrineColumn) $column)

    $column

    Returns a PHP string representing options to pass to a widget for a given column.

    returns The options to pass to the widget as a PHP string

  • initialize ($generatorManager)

    $generatorManager A sfGeneratorManager instance

    Initializes the current sfGenerator instance.

  • (Boolean) isI18n ()

    Returns true if the current table is internationalized.

    returns true if the current table is internationalized, false otherwise

  • (boolean) isPluginModel ($modelName)

    $modelName

    Check to see if a model is part of a plugin

  • loadModels ()

    Loads all Doctrine builders.

  • underscore ($name)

    $name