symfony API

sfModelGenerator 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.4 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.

Model generator.

Inheritence

sfPropelGenerator, sfDoctrineGenerator  <  sfModelGenerator  <  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) addCredentialCondition ($content, $params)

    $content The content
    $params The parameters

    Wraps content with a credential condition.

    returns HTML code

  • asPhp ()

  • configure ()

    Configures this generator.

  • escapeString ()

  • (string) generate ($params)

    $params The parameters

    Generates classes and templates in cache.

    returns The data to put in configuration cache

  • (string) getActionsBaseClass ()

    Gets the actions base class for the generated module.

    returns The actions base class

  • getAllFieldNames ()

  • (string) getColumnGetter ($column, $developed, $prefix)

    $column The column name
    $developed true if you want developped method names, false otherwise
    $prefix The prefix value

    Returns the getter either non-developped: 'getFoo' or developped: '$class->getFoo()'.


    This method is ORM dependant.

    returns PHP code

  • (string) getFormMultipartHtml ()

    Gets the HTML to add to the form tag if the form is multipart.

  • (sfForm) getFormObject ()

    Gets the form object

  • (string) getI18nCatalogue ()

    Gets the i18n catalogue to use for user strings.

    returns The i18n catalogue

  • (string) getI18NString ($key)

    $key The configuration key name

    Wraps a content for I18N.

    returns HTML code

  • (string) getLinkToAction ($actionName, $params, $pk_link)

    $actionName The action name
    $params The parameters
    $pk_link Whether to add a primary key link or not

    Returns HTML code for an action link.

    returns HTML code

  • getManyToManyTables ()

  • (string) getModelClass ()

    Gets the class name for current model.

  • (string) getPluralName ()

    Gets the plural name for current model.

  • (array) getPrimaryKeys ($firstOne)

    $firstOne Whether to return the first PK or not

    Gets the primary key name.

    returns An array of primary keys

  • (string) getPrimaryKeyUrlParams ($prefix)

    $prefix The prefix value

    Returns PHP code to add to a URL for primary keys.

    returns PHP code

  • (string) getRetrieveByPkParamsForAction ($indent, $callee)

    $indent The indentation value
    $callee The function to call

    Returns PHP code for primary keys parameters.

    returns The PHP code

  • (string) getSingularName ()

    Gets the singular name for current model.

  • getType ()

  • (string) getUrlForAction ()

    Returns the URL for a given action.

    returns The URL related to a given action

  • loadConfiguration ()

    Loads the configuration for this generated module.

  • (string) renderField ($field)

    $field The field

    Returns HTML code for a field.

    returns HTML code

  • validateParameters ($params)

    $params An array of parameters

    Validates the basic structure of the parameters.