symfony API

sfCrudGenerator 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.0 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 , __call

Method Details

  • (string) generate ()

    Generates classes and templates in cache.

    returns The data to put in configuration cache

  • (string) getClassName ()

    Gets the class name for current scaffolding class.

  • (string) getColumnGetter (, , )

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


    This method is ORM dependant.

    returns PHP code

  • (string) getColumnListTag (, )

    Returns HTML code for a column in list mode.

    returns HTML code

  • (string) getCrudColumnEditTag (, )

    Returns HTML code for a column in edit mode.

    returns HTML code

  • (object) getMap ()

    Gets the Map object.

  • (string) getMethodParamsForGetOrCreate ()

    Returns PHP code for getOrCreate() parameters.

    returns The PHP code

  • (string) getObjectTagParams (, )

    Gets object tag parameters.

    returns PHP code

  • (string) getPeerClassName ()

    Gets the Peer class name.

  • (string) getPHPObjectHelper (, , , )

    Generates a PHP call to an object helper.


    This method is ORM dependant.

    returns PHP code

  • (string) getPluralName ()

    Gets the plural name for current scaffolding class.

  • (string) getPrimaryKey ()

    Gets the primary key name.

  • (string) getPrimaryKeyIsSet ()

    Gets PHP code for primary key condition.

    returns PHP code

  • (string) getPrimaryKeyUrlParams ()

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

    returns PHP code

  • getRelatedClassName ()

  • (string) getRetrieveByPkParamsForAction ()

    Returns PHP code for primary keys parameters.

    returns The PHP code

  • (string) getRetrieveByPkParamsForGetOrCreate ()

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

    returns The PHP code

  • (string) getSingularName ()

    Gets the singular name for current scaffolding class.

  • (TableMap) getTableMap ()

    Gets the table map for the current model class.

    returns A TableMap instance

  • (string) getTestPksForGetOrCreate ()

    Returns PHP code for getOrCreate() promary keys condition.

    returns The PHP code

  • loadMapBuilderClasses ()

    Loads map builder classes.


    This method is ORM dependant.

    throws sfException

  • loadPrimaryKeys ()

    Loads primary keys.


    This method is ORM dependant.

    throws sfException

  • setScaffoldingClassName ()

    Sets the class name to use for scaffolding