static function deflateFunctionNode(&$node, $preHook, $postHook)
 {
     $newNodes = array();
     $children = eZTemplateNodeTool::extractFunctionNodeChildren($node);
     eZTemplateNodeTool::removeFunctionNodeChildren($node);
     $preNode = $node;
     $preHookParameters = array();
     if (isset($preHook['parameters'])) {
         $preHookParameters = $preHook['parameters'];
     }
     $preHookFunction = false;
     if (isset($preHook['function'])) {
         $preHookFunction = $preHook['function'];
     }
     eZTemplateNodeTool::createFunctionNodeHook($preNode, $preHook['name'], $preHookParameters, $preHookFunction);
     if (isset($preHook['use-parameters']) and !$preHook['use-parameters']) {
         eZTemplateNodeTool::removeFunctionNodeParameters($preNode);
     }
     $newNodes[] = $preNode;
     $newNodes = array_merge($newNodes, $children);
     $postNode = $node;
     $postHookParameters = array();
     if (isset($postHook['parameters'])) {
         $postHookParameters = $postHook['parameters'];
     }
     $postHookFunction = false;
     if (isset($postHook['function'])) {
         $postHookFunction = $postHook['function'];
     }
     eZTemplateNodeTool::createFunctionNodeHook($postNode, $postHook['name'], $postHookParameters, $postHookFunction);
     if (isset($postHook['use-parameters']) and !$postHook['use-parameters']) {
         eZTemplateNodeTool::removeFunctionNodeParameters($postNode);
     }
     $newNodes[] = $postNode;
     return $newNodes;
 }