1
0
mirror of synced 2024-12-13 06:46:03 +03:00

example nested set fixture file provided by 'bwegrzyn'

This commit is contained in:
gnat 2007-12-12 04:22:58 +00:00
parent 41defae276
commit d222f37b50

View File

@ -112,4 +112,23 @@ Here is how you would write code to load the data from that data.yml file
<code type="php">
$data = new Doctrine_Data();
$data->importData('data.yml', 'yml');
</code>
++ Fixtures For Nested Sets
Writing a fixtures file for a nested set tree is slightly different from writing regular fixtures files. The structure of the tree is defined like this:
<code type="yml">
---
Category:
Category_1:
title: Categories # the root node
children:
Category_2:
title: Category 1
Category_3:
title: Category 2
children:
Category_4:
title: Subcategory of Category 2
</code>