/** * Override the method to set the document source filename to be like symfony templates filename * * Available options: * - dirname: The dirname of the document source file (symfony module templates directory by default) * - basename: The basename of the document source file (symfony action name by default) * - extension: The extension of the document source file (odt by default) * * @param mixed $options The sourcePathname or an array of options */ public function setSourcePathname($options = array()) { if (is_array($options)) { $context = sfContext::getInstance(); if (!isset($options['dirname'])) { $options['dirname'] = $context->getModuleDirectory() . DIRECTORY_SEPARATOR . 'templates'; } if (!isset($options['basename'])) { $options['basename'] = $context->getActionName(); } if (!isset($options['extension'])) { $options['extension'] = $this->getDefaultExtension(); } $sourcePathname = $options['dirname'] . DIRECTORY_SEPARATOR . $options['basename'] . 'Success' . '.' . $options['extension']; } else { $sourcePathname = $options; } parent::setSourcePathname($sourcePathname); }