symfony API

sfModelGenerator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:

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) Browse code

    $content The content
    $params The parameters

    Wraps content with a credential condition.

    returns HTML code

  • asPhp () Browse code

  • configure () Browse code

    Configures this generator.

  • escapeString () Browse code

  • (string) generate ($params) Browse code

    $params The parameters

    Generates classes and templates in cache.

    returns The data to put in configuration cache

  • (string) getActionsBaseClass () Browse code

    Gets the actions base class for the generated module.

    returns The actions base class

  • getAllFieldNames () Browse code

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

    $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 () Browse code

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

  • (sfForm) getFormObject () Browse code

    Gets the form object

  • (string) getI18nCatalogue () Browse code

    Gets the i18n catalogue to use for user strings.

    returns The i18n catalogue

  • (string) getI18NString ($key) Browse code

    $key The configuration key name

    Wraps a content for I18N.

    returns HTML code

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

    $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 () Browse code

  • (string) getModelClass () Browse code

    Gets the class name for current model.

  • (string) getPluralName () Browse code

    Gets the plural name for current model.

  • (array) getPrimaryKeys ($firstOne) Browse code

    $firstOne Whether to return the first PK or not

    Gets the primary key name.

    returns An array of primary keys

  • (string) getPrimaryKeyUrlParams ($prefix) Browse code

    $prefix The prefix value

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

    returns PHP code

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

    $indent The indentation value
    $callee The function to call

    Returns PHP code for primary keys parameters.

    returns The PHP code

  • (string) getSingularName () Browse code

    Gets the singular name for current model.

  • getType () Browse code

  • (string) getUrlForAction () Browse code

    Returns the URL for a given action.

    returns The URL related to a given action

  • loadConfiguration () Browse code

    Loads the configuration for this generated module.

  • (string) renderField ($field) Browse code

    $field The field

    Returns HTML code for a field.

    returns HTML code

  • validateParameters ($params) Browse code

    $params An array of parameters

    Validates the basic structure of the parameters.