Add custom UllUser columns

Define the new columns in the model

  • /config/doctrine/schema.yml
    • Only define you additional columns here. They are added to the default ones from ullCorePlugin
    • Example:
      • UllUser:
              type: string(32)
              type: string(32)

Create migration to adapt the actual database layout

(Add columns, constraints, etc)

  • php symfony doctrine:generate-migration add_company_data
    • The migration file is created in /lib/migrations/doctrine/ and called something like 1304062858_add_company_data.php
  • Move the migration file to /lib/migrations/custom/ because it is a custom migration of yours
  • Edit the migration file and add your database changes.

    All possible command can be found here:
    • Example:

    class AddCompanyData extends Doctrine_Migration_Base
      // List of user tables (one versionable table for each entity type)
      protected $tableNames = array(
      public function up()
        // Add columns for each entity type table
        foreach ($this->tableNames as $tableName)
          $this->addColumn($tableName, 'commercial_register_number', 'string', 32);
          $this->addColumn($tableName, 'sales_tax_indentification_number', 'string', 32);
      public function down()
        throw new Doctrine_Migration_IrreversibleMigrationException('This migration can not be undone.');

Adapt columnsConfig

ColumnConfigs provide additional information about database columns like which widgets to use, label and help texts

Your custom columnsConfig for the user fields can be found at apps/frontend/lib/generator/columnConfigCollection/UllUserColumnConfigCollection.class.php



class UllUserColumnConfigCollection extends BaseUllUserColumnConfigCollection
   * Applies model specific custom column configuration
  protected function applyCustomSettings()
    # Disable some ullCore columns we don't need 
    # Configure custom columns
      ->setLabel(__('Commercial reg. no.', null, 'custom'))
      ->setLabel(__('Tax no.', null, 'custom'))


The e.g. german translations are added to apps/frontend/i18n/


<?xml version="1.0"?>
<xliff version="1.0">
  <file orginal="global" source-language="en_US" datatype="plaintext" date="2007-12-13T14:54:05Z">

<trans-unit id="1">
<source>Commercial reg. no.</source>

<trans-unit id="2">
<source>Tax no.</source>
<target>USt. Id</target>


Rebuild the model and execute the migration

  • php symfony doctrine:build --model --forms --filters
  • php symfony ullright:custom-migrate