symfony API

sfDoctrineRecord 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.

Base sfDoctrineRecord extends the base Doctrine_Record in Doctrine to provide some symfony specific functionality to Doctrine_Records

Method Summary

  • construct()
    Custom Doctrine_Record constructor.
  • string getDefaultCulture()
    Return the default culture
  • mixed getPrimaryKey()
    Get the primary key of a Doctrine_Record.
  • initializeI18n()
    Initialize I18n culture from symfony sfUser instance Add event listener to change default culture whenever the user changes culture
  • boolean isNew()
    Function require by symfony >= 1.2 admin generators
  • listenToChangeCultureEvent($event)
    Listens to the user.change_culture event.
  • setDefaultCulture($culture)
    Sets the default culture
  • __call($method, $arguments)
  • string __toString()
    Returns a string representation of the record.

Method Details

  • construct () Browse code

    Custom Doctrine_Record constructor.


    Used to initialize I18n to make sure the culture is set from symfony

  • (string) getDefaultCulture () Browse code

    Return the default culture

    returns the default culture

  • (mixed) getPrimaryKey () Browse code

    Get the primary key of a Doctrine_Record.


    This a proxy method to Doctrine_Record::identifier() for Propel BC

    returns Array for composite primary keys and string for single primary key

  • initializeI18n () Browse code

    Initialize I18n culture from symfony sfUser instance Add event listener to change default culture whenever the user changes culture

  • (boolean) isNew () Browse code

    Function require by symfony >= 1.2 admin generators

  • listenToChangeCultureEvent ($event) Browse code

    $event An sfEvent instance

    Listens to the user.change_culture event.

  • setDefaultCulture ($culture) Browse code

    $culture

    Sets the default culture

  • __call ($method, $arguments) Browse code

    $method
    $arguments

  • (string) __toString () Browse code

    Returns a string representation of the record.

    returns A string representation of the record.