Skip to content
Snippets Groups Projects

Dev#73871 minsoc xlst etape 2 association fichier xslt

Closed Ghislain Loas requested to merge dev#73871_minsoc_xlst_etape_2_association_fichier_xslt into WIP
Viewing commit 13e31125
Show latest version
6 files
+ 116
69
Preferences
Compare changes
Files
6
@@ -21,7 +21,9 @@
class Class_Notice_Xsl {
use Trait_StaticPhpCommand;
use Trait_StaticPhpCommand, Trait_Yaz;
const KEY = 'xslt';
protected
$_record,
@@ -58,6 +60,19 @@ class Class_Notice_Xsl {
}
public function getMarcXmlFile() {
if(!$this->_record)
return '';
if(!$marc = $this->_record->getUnimarc())
return '';
return ($marc_xml_array = static::getYaz()->marcToMarcXml($marc))
? static::getYaz()->writeMarcXmlInFile(implode($marc_xml_array))
: '';
}
protected function _getXslFileFromProfile() {
$settings = $this->_profile->getCfgModulesPreferences('recherche', 'viewnotice', $this->_record->getTypeDoc());
if(!$settings)
@@ -66,9 +81,9 @@ class Class_Notice_Xsl {
if(empty($settings))
return;
if(!array_key_exists('xsl', $settings))
if(!array_key_exists(Class_Notice_Xsl::KEY, $settings))
return;
return $settings['xsl'];
return $settings[Class_Notice_Xsl::KEY];
}
}
\ No newline at end of file