Changeset 8299
- Timestamp:
- 04/04/08 19:06:54 (3 months ago)
- Files:
-
- doc/branches/1.1/book/17-Extending-Symfony.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/branches/1.1/book/17-Extending-Symfony.txt
r8287 r8299 641 641 fixtures/ 642 642 *.yml // Fixtures files 643 tasks/644 *.php // CLI tasks645 643 lib/ 646 644 *.php // Classes … … 649 647 model/ 650 648 *.php // Model classes 649 task/ 650 *Task.class.php // CLI tasks 651 651 modules/ 652 652 */ // Modules … … 682 682 * The plug-in configuration is to be included in the plug-in bootstrap script (`config.php`). This file is executed after the application and project configuration, so symfony is already bootstrapped at that time. You can use this file, for instance, to add directories to the PHP include path or to extend existing classes with mixins. 683 683 * Fixtures files located in the plug-in `data/fixtures/` directory are processed by the `propel:data-load` task. 684 * Tasks are immediately available to the symfony command line as soon as the plug-in is installed. It is a best practice to prefix the task by something meaningful--for instance, the plug-in name. Type `php symfony` to see the list of available tasks, including the ones added by plug-ins.685 684 * Custom classes are autoloaded just like the ones you put in your project `lib/` folders. 686 685 * Helpers are automatically found when you call `use_helper()` in templates. They must be in a` helper/` subdirectory of one of the plug-in's `lib/` directory. 687 686 * Model classes in `myplugin/lib/model/` specialize the model classes generated by the Propel builder (in `myplugin/lib/model/om/` and `myplugin/lib/model/map/`). They are, of course, autoloaded. Be aware that you cannot override the generated model classes of a plug-in in your own project directories. 687 * Tasks are immediately available to the symfony command line as soon as the plug-in is installed. A plugin can either add new tasks, or override an existing one. It is a best practice to use the plug-in name as a namespace for the task. Type `php symfony` to see the list of available tasks, including the ones added by plug-ins. 688 688 * Modules provide new actions accessible from the outside, provided that you declare them in the `enabled_modules` setting in your application. 689 689 * Web assets (images, scripts, style sheets, etc.) are made available to the server. When you install a plug-in via the command line, symfony creates a symlink to the project `web/` directory if the system allows it, or copies the content of the module `web/` directory into the project one. If the plug-in is installed from an archive or a version control repository, you have to copy the plug-in `web/` directory by hand (as the `README` bundled with the plug-in should mention). … … 812 812 fixtures/ 813 813 fixtures.yml 814 tasks/815 sfSampleTask.php816 814 lib/ 817 815 model/ 818 816 sfSampleFooBar.php 819 817 sfSampleFooBarPeer.php 818 task/ 819 sfSampleTask.class.php 820 820 validator/ 821 821 sfSampleValidator.class.php … … 885 885 <file role="data" name="fixtures.yml" /> 886 886 </dir> 887 <dir name="tasks">888 <!-- tasks -->889 <file role="data" name="sfSampleTask.php" />890 </dir>891 887 </dir> 892 888 <dir name="lib"> … … 895 891 <file role="data" name="sfSampleFooBar.php" /> 896 892 <file role="data" name="sfSampleFooBarPeer.php" /> 893 </dir> 894 <dir name="task"> 895 <!-- tasks --> 896 <file role="data" name="sfSampleTask.class.php" /> 897 897 </dir> 898 898 <dir name="validator"> … … 991 991 fixtures/ 992 992 fixtures.yml 993 tasks/994 sfSampleTask.php995 993 lib/ 996 994 model/ 997 995 sfSampleFooBar.php 998 996 sfSampleFooBarPeer.php 997 task/ 998 sfSampleTask.class.php 999 999 validator/ 1000 1000 sfSampleValidator.class.php