Add an helper to build the export of the PFOs.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 6 Nov 2010 07:53:43 +0000 (08:53 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 6 Nov 2010 07:53:43 +0000 (08:53 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plfilter.php

index 30c95f3..f36a803 100644 (file)
@@ -62,6 +62,15 @@ abstract class PlFilterOrder implements PlExportable
         $this->_tokens = null;
     }
 
+    protected function buildExport($type)
+    {
+        $export = array('type' => $type);
+        if ($this->desc) {
+            $export['order'] = 'desc';
+        }
+        return $export;
+    }
+
     public function export()
     {
         throw new Exception("This instance is not exportable");