From d222f37b50d719ff2c24e6edbe2d3cc2a7f64074 Mon Sep 17 00:00:00 2001 From: gnat Date: Wed, 12 Dec 2007 04:22:58 +0000 Subject: [PATCH] example nested set fixture file provided by 'bwegrzyn' --- manual/docs/en/data-fixtures.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/manual/docs/en/data-fixtures.txt b/manual/docs/en/data-fixtures.txt index d8d217802..80f702d33 100644 --- a/manual/docs/en/data-fixtures.txt +++ b/manual/docs/en/data-fixtures.txt @@ -112,4 +112,23 @@ Here is how you would write code to load the data from that data.yml file $data = new Doctrine_Data(); $data->importData('data.yml', 'yml'); + + +++ 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: + + +--- + 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 \ No newline at end of file