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 786da038
Show latest version
5 files
+ 92
11
Preferences
Compare changes
Files
5
@@ -40,16 +40,13 @@ class Class_Notice_Xsl {
public function isEnabled() {
if(!static::getPhpCommand()->extension_loaded('xsl'))
return false;
if(!$this->_record)
return false;
if(!$this->_profile)
return false;
if(!$this->getXslFile())
if(!$this->getXslFileUrl())
return false;
return true;
@@ -89,8 +86,8 @@ class Class_Notice_Xsl {
}
protected function _getXslFileFromProfile() {
$settings = $this->_profile->getCfgModulesPreferences('recherche', 'viewnotice', $this->_record->getTypeDoc());
public function getXslFileUrl() {
$settings = $this->_profile->getCfgModulesPreferences('recherche', 'viewnotice', $this->_record->getTypeDoc());
if(!$settings)
return;
@@ -98,7 +95,18 @@ class Class_Notice_Xsl {
return;
return array_key_exists(Class_Notice_Xsl::KEY, $settings)
? Class_FileManager::find($settings[Class_Notice_Xsl::KEY])
? $settings[Class_Notice_Xsl::KEY]
: null;
}
public function isActivated() {
return static::getPhpCommand()->extension_loaded('xsl');
}
protected function _getXslFileFromProfile() {
Class_FileManager::beOpenBar();
return Class_FileManager::find($this->getXslFileUrl());
}
}
\ No newline at end of file