symfony API

sfCrudGenerator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

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.

CRUD generator.

Inheritence

sfAdminGenerator  <  sfCrudGenerator  <  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) generate ($params = array()) Browse code

    $params The parameters

    Generates classes and templates in cache.

    returns The data to put in configuration cache

  • (string) getClassName () Browse code

    Gets the class name for current scaffolding class.

  • (string) getColumnGetter ($column, $developed = false, $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: &apos;getFoo&apos; or developped: &apos;$class-&gt;getFoo()&apos;.


    This method is ORM dependant.

    returns PHP code

  • (string) getColumnListTag ($column, $params = array()) Browse code

    $column The column name
    $params The parameters

    Returns HTML code for a column in list mode.

    returns HTML code

  • (string) getCrudColumnEditTag ($column, $params = array()) Browse code

    $column The column name
    $params The parameters

    Returns HTML code for a column in edit mode.

    returns HTML code

  • (object) getMap () Browse code

    Gets the Map object.

  • (string) getMethodParamsForGetOrCreate () Browse code

    Returns PHP code for getOrCreate() parameters.

    returns The PHP code

  • (string) getObjectTagParams ($params, $default_params = array()) Browse code

    $params An array of parameters
    $default_params An array of default parameters

    Gets object tag parameters.

    returns PHP code

  • (string) getPHPObjectHelper ($helperName, $column, $params, $localParams = array()) Browse code

    $helperName The helper name
    $column The column name
    $params An array of parameters
    $localParams An array of local parameters

    Generates a PHP call to an object helper.


    This method is ORM dependant.

    returns PHP code

  • (string) getPluralName () Browse code

    Gets the plural name for current scaffolding class.

  • (string) getPrimaryKey () Browse code

    Gets the primary key name.

  • (string) getPrimaryKeyIsSet ($prefix = '') Browse code

    $prefix The prefix value

    Gets PHP code for primary key condition.

    returns PHP code

  • (string) getPrimaryKeyUrlParams ($prefix = '', $full = false) Browse code

    $prefix The prefix value
    $full

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

    returns PHP code

  • getRelatedClassName ($column) Browse code

    $column

  • (string) getRetrieveByPkParamsForAction ($indent, $callee = '$this->getRequestParameter') Browse code

    $indent The indentation value
    $callee The function to call

    Returns PHP code for primary keys parameters.

    returns The PHP code

  • (string) getRetrieveByPkParamsForEdit ($indent, $prefix) Browse code

    $indent The indentation value
    $prefix No effect at this time

    Returns PHP code for primary keys parameters.

    returns The PHP code

  • (string) getRetrieveByPkParamsForGetOrCreate () Browse code

    Returns PHP code for primary keys parameters used in getOrCreate() method.

    returns The PHP code

  • (string) getSingularName () Browse code

    Gets the singular name for current scaffolding class.

  • (TableMap) getTableMap () Browse code

    Gets the table map for the current model class.

    returns A TableMap instance

  • (string) getTestPksForGetOrCreate ($fieldNameAsArgument = true) Browse code

    $fieldNameAsArgument true if we pass the field name as an argument, false otherwise

    Returns PHP code for getOrCreate() promary keys condition.

    returns The PHP code

  • loadMapBuilderClasses () Browse code

    Loads map builder classes.


    This method is ORM dependant.

    throws sfException

  • loadPrimaryKeys () Browse code

    Loads primary keys.


    This method is ORM dependant.

    throws sfException

  • setScaffoldingClassName ($className) Browse code

    $className class name

    Sets the class name to use for scaffolding