Development

Changeset 23454 for doc

You must first sign up to be able to contribute.

Changeset 23454 for doc

Show
Ignore:
Timestamp:
10/30/09 07:04:34 (4 years ago)
Author:
fabien
Message:

[doc] [1.3] updated chapter 16 of the reference book

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.3/reference/en/16-Tasks.markdown

    r22991 r23454  
    623623 
    624624 
    625 The `doctrine:build-filters` task creates filter form classes from the schema: 
     625The `doctrine:build-filters` task creates form filter classes from the schema: 
    626626 
    627627    ./symfony doctrine:build-filters 
    628628 
    629 The task read the schema information in `config/*schema.xml` and/or 
    630 `config/*schema.yml` from the project and all installed plugins. 
    631  
    632 The model filter form classes files are created in `lib/filter`. 
    633  
    634 This task never overrides custom classes in `lib/filter`. 
    635 It only replaces base classes generated in `lib/filter/base`. 
     629This task creates form filter classes based on the model. The classes are 
     630created in `lib/doctrine/filter`. 
     631 
     632This task never overrides custom classes in `lib/doctrine/filter`. 
     633It only replaces base classes generated in `lib/doctrine/filter/base`. 
    636634 
    637635### ~`doctrine::build-forms`~ 
     
    657655    ./symfony doctrine:build-forms 
    658656 
    659 The task read the schema information in `config/*schema.xml` and/or 
    660 `config/*schema.yml` from the project and all installed plugins. 
    661  
    662 The model form classes files are created in `lib/form`. 
    663  
    664 This task never overrides custom classes in `lib/form`. 
    665 It only replaces base classes generated in `lib/form/base`. 
     657This task creates form classes based on the model. The classes are created 
     658in `lib/doctrine/form`. 
     659 
     660This task never overrides custom classes in `lib/doctrine/form`. 
     661It only replaces base classes generated in `lib/doctrine/form/base`. 
    666662 
    667663### ~`doctrine::build-model`~ 
     
    686682 
    687683The task read the schema information in `config/doctrine/*.yml` 
    688 from the project and all installed plugins. 
     684from the project and all enabled plugins. 
    689685 
    690686The model classes files are created in `lib/model/doctrine`. 
     
    754750 
    755751 
    756  
     752The `doctrine:clean-model-files` task deletes model classes that are not 
     753represented in project or plugin schema.yml files: 
     754 
     755    ./symfony doctrine:clean-model-files 
    757756 
    758757### ~`doctrine::create-model-tables`~ 
     
    807806the `doctrine:data-load` task. 
    808807 
    809     ./symfony doctrine:data-load frontend 
     808    ./symfony doctrine:data-load 
    810809 
    811810### ~`doctrine::data-load`~ 
     
    863862 
    864863 
    865  
     864The `doctrine:delete-model-files` task deletes all files associated with certain 
     865models: 
     866 
     867    ./symfony doctrine:delete-model-files Article Author 
    866868 
    867869### ~`doctrine::dql`~ 
     
    915917    ./symfony doctrine:drop-db 
    916918 
    917 The task read connection information in `config/doctrine/databases.yml`: 
     919The task read connection information in `config/databases.yml`: 
    918920 
    919921### ~`doctrine::generate-admin`~ 
     
    921923The `doctrine::generate-admin` task generates a Doctrine admin module: 
    922924 
    923     $ php symfony doctrine:generate-admin [--module="..."] [--theme="..."] [--singular="..."] [--plural="..."] [--env="..."] application route_or_model 
     925    $ php symfony doctrine:generate-admin [--module="..."] [--theme="..."] [--singular="..."] [--plural="..."] [--env="..."] [--actions-base-class="..."] application route_or_model 
    924926 
    925927 
     
    938940| `--plural` | `-` | The plural name 
    939941| `--env` | `dev` | The environment 
     942| `--actions-base-class` | `sfActions` | The base class for the actions 
    940943 
    941944 
     
    10101013 
    10111014 
    1012 The `doctrine:generate-migration` task generates migration classes from existing database connections 
    1013  
    1014     ./symfony doctrine:generate-migration 
     1015The `doctrine:generate-migrations-db` task generates migration classes from 
     1016existing database connections: 
     1017 
     1018    ./symfony doctrine:generate-migrations-db 
    10151019 
    10161020### ~`doctrine::generate-migrations-diff`~ 
     
    10301034 
    10311035 
    1032 The `doctrine:generate-migrations-diff` task generates migration classes by producing a diff between your old and new schema. 
     1036The `doctrine:generate-migrations-diff` task generates migration classes by 
     1037producing a diff between your old and new schema. 
    10331038 
    10341039    ./symfony doctrine:generate-migrations-diff 
     
    10501055 
    10511056 
    1052 The `doctrine:generate-migration` task generates migration classes from an existing set of models 
    1053  
    1054     ./symfony doctrine:generate-migration 
     1057The `doctrine:generate-migrations-models` task generates migration classes 
     1058from an existing set of models: 
     1059 
     1060    ./symfony doctrine:generate-migrations-models 
    10551061 
    10561062### ~`doctrine::generate-module`~ 
     
    10581064The `doctrine::generate-module` task generates a Doctrine module: 
    10591065 
    1060     $ php symfony doctrine:generate-module [--theme="..."] [--generate-in-cache] [--non-verbose-templates] [--with-show] [--singular="..."] [--plural="..."] [--route-prefix="..."] [--with-doctrine-route] [--env="..."] application module model 
     1066    $ php symfony doctrine:generate-module [--theme="..."] [--generate-in-cache] [--non-verbose-templates] [--with-show] [--singular="..."] [--plural="..."] [--route-prefix="..."] [--with-doctrine-route] [--env="..."] [--actions-base-class="..."] application module model 
    10611067 
    10621068*Alias(es)*: `doctrine-generate-crud, doctrine:generate-crud` 
     
    10801086| `--with-doctrine-route` | `-` | Whether you will use a Doctrine route 
    10811087| `--env` | `dev` | The environment 
     1088| `--actions-base-class` | `sfActions` | The base class for the actions 
    10821089 
    10831090 
     
    11011108This way, you can create your very own module generator with your own conventions. 
    11021109 
     1110You can also change the default actions base class (default to sfActions) of 
     1111the generated modules: 
     1112 
     1113    ./symfony doctrine:generate-module --actions-base-class="ProjectActions" frontend article Article 
     1114 
    11031115### ~`doctrine::generate-module-for-route`~ 
    11041116 
    11051117The `doctrine::generate-module-for-route` task generates a Doctrine module for a route definition: 
    11061118 
    1107     $ php symfony doctrine:generate-module-for-route [--theme="..."] [--non-verbose-templates] [--singular="..."] [--plural="..."] [--env="..."] application route 
     1119    $ php symfony doctrine:generate-module-for-route [--theme="..."] [--non-verbose-templates] [--singular="..."] [--plural="..."] [--env="..."] [--actions-base-class="..."] application route 
    11081120 
    11091121 
     
    11221134| `--plural` | `-` | The plural name 
    11231135| `--env` | `dev` | The environment 
     1136| `--actions-base-class` | `sfActions` | The base class for the actions 
    11241137 
    11251138 
     
    11521165 
    11531166The task connects to the database and creates tables for all the 
    1154 `lib/model/doctrine/*.php` files. 
     1167`lib/model/doctrine/*.class.php` files. 
    11551168 
    11561169### ~`doctrine::migrate`~ 
     
    12151228    ./symfony doctrine:rebuild-db 
    12161229 
    1217 The task read connection information in `config/doctrine/databases.yml`: 
     1230The task read connection information in `config/databases.yml`: 
    12181231 
    12191232Include the `--migrate` option if you would like to run your application's 
     
    12421255 
    12431256 
    1244 The `doctrine:reload-data` task drops the database, recreates it and loads fixtures 
    1245 Call it with
     1257The `doctrine:reload-data` task drops the database, recreates it and loads 
     1258fixtures
    12461259 
    12471260    php symfony doctrine:reload-data 
     
    13061319    ./symfony generate:app frontend --csrf-secret=UniqueSecret 
    13071320 
     1321You can customize the default skeleton used by the task by creating a 
     1322`%sf_data_dir%/skeleton/app` directory. 
    13081323 
    13091324### ~`generate::module`~ 
     
    13491364The `generate::project` task generates a new project: 
    13501365 
    1351     $ php symfony generate:project [--orm="..."] [--installer="..."] name 
     1366    $ php symfony generate:project [--orm="..."] [--installer="..."] name [author] 
    13521367 
    13531368*Alias(es)*: `init-project` 
     
    13561371| -------- | ------- | ----------- 
    13571372| `name` | `-` | The project name 
     1373| `author` | `Your name here` | The project author 
    13581374 
    13591375 
     
    13851401 
    13861402    ./symfony generate:project blog --installer=./installer.php 
     1403 
     1404You can optionally include a second `author` argument to specify what name to 
     1405use as author when symfony generates new classes: 
     1406 
     1407    ./symfony generate:project blog "Jack Doe" 
    13871408 
    13881409### ~`generate::task`~ 
     
    18681889    ./symfony project:deploy --go --rsync-dir=config/production production 
    18691890 
    1870 Last, you can specify the options passed to the rsync executable, using the  
    1871 `rsync-options` option (defaults are `-azC`): 
    1872  
    1873     ./symfony project:deploy --go --rsync-options=avz 
     1891Last, you can specify the options passed to the rsync executable, using the 
     1892`rsync-options` option (defaults are `-azC --force --delete --progress`): 
     1893 
     1894    ./symfony project:deploy --go --rsync-options=-avz 
    18741895 
    18751896### ~`project::disable`~ 
     
    19271948The `project::optimize` task optimizes a project for better performance: 
    19281949 
    1929     $ php symfony project:optimize  [env] [app1] ... [appN
    1930  
    1931  
    1932  
    1933 | Argument | Default | Description 
    1934 | -------- | ------- | ----------- 
    1935 | `env` | `prod` | The environment name 
    1936 | `app` | `-` | The application name 
     1950    $ php symfony project:optimize  application [environment
     1951 
     1952 
     1953 
     1954| Argument | Default | Description 
     1955| -------- | ------- | ----------- 
     1956| `application` | `-` | The server name 
     1957| `environment` | `prod` | The server name 
    19371958 
    19381959 
     
    19411962The `project:optimize` optimizes a project for better performance: 
    19421963 
    1943     ./symfony project:optimize 
     1964    ./symfony project:optimizes frontend prod 
    19441965 
    19451966This task should only be used on a production server. Don't forget to re-run 
    19461967the task each time the project changes. 
    1947  
    1948 You can specify an environment other than `prod` by passing it as an 
    1949 argument: 
    1950  
    1951     ./symfony project:optimize staging 
    1952  
    1953 You can further specify one or more applications to optimize by passing 
    1954 additional arguments: 
    1955  
    1956     ./symfony project:optimize prod frontend 
    19571968 
    19581969### ~`project::permissions`~ 
     
    24172428The `propel::generate-admin` task generates a Propel admin module: 
    24182429 
    2419     $ php symfony propel:generate-admin [--module="..."] [--theme="..."] [--singular="..."] [--plural="..."] [--env="..."] application route_or_model 
     2430    $ php symfony propel:generate-admin [--module="..."] [--theme="..."] [--singular="..."] [--plural="..."] [--env="..."] [--actions-base-class="..."] application route_or_model 
    24202431 
    24212432 
     
    24342445| `--plural` | `-` | The plural name 
    24352446| `--env` | `dev` | The environment 
     2447| `--actions-base-class` | `sfActions` | The base class for the actions 
    24362448 
    24372449 
     
    24652477The `propel::generate-module` task generates a Propel module: 
    24662478 
    2467     $ php symfony propel:generate-module [--theme="..."] [--generate-in-cache] [--non-verbose-templates] [--with-show] [--singular="..."] [--plural="..."] [--route-prefix="..."] [--with-propel-route] [--env="..."] application module model 
     2479    $ php symfony propel:generate-module [--theme="..."] [--generate-in-cache] [--non-verbose-templates] [--with-show] [--singular="..."] [--plural="..."] [--route-prefix="..."] [--with-propel-route] [--env="..."] [--actions-base-class="..."] application module model 
    24682480 
    24692481*Alias(es)*: `propel-generate-crud, propel:generate-crud` 
     
    24872499| `--with-propel-route` | `-` | Whether you will use a Propel route 
    24882500| `--env` | `dev` | The environment 
     2501| `--actions-base-class` | `sfActions` | The base class for the actions 
    24892502 
    24902503 
     
    25082521This way, you can create your very own module generator with your own conventions. 
    25092522 
     2523You can also change the default actions base class (default to sfActions) of 
     2524the generated modules: 
     2525 
     2526    ./symfony propel:generate-module --actions-base-class="ProjectActions" frontend article Article 
     2527 
    25102528### ~`propel::generate-module-for-route`~ 
    25112529 
    25122530The `propel::generate-module-for-route` task generates a Propel module for a route definition: 
    25132531 
    2514     $ php symfony propel:generate-module-for-route [--theme="..."] [--non-verbose-templates] [--singular="..."] [--plural="..."] [--env="..."] application route 
     2532    $ php symfony propel:generate-module-for-route [--theme="..."] [--non-verbose-templates] [--singular="..."] [--plural="..."] [--env="..."] [--actions-base-class="..."] application route 
    25152533 
    25162534 
     
    25292547| `--plural` | `-` | The plural name 
    25302548| `--env` | `dev` | The environment 
     2549| `--actions-base-class` | `sfActions` | The base class for the actions 
    25312550 
    25322551