55 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
56 $this->TemplateManager =
get_package(
'template_manager' ,
'last' , __FILE__ );
90 return( basename( $Settings->get_setting(
'value' ) ) );
116 private function get_path_from_template()
120 $TemplatePath = $this->TemplateManager->get_template_path(
121 $this->TemplateName , $this->TemplateVersion
123 $RealFilePath = $this->CachedMultyFS->get_file_path(
124 $TemplatePath.
"/res/images/$FileName" ,
false
126 if( $RealFilePath ===
false )
129 $RealFilePath = $PageComposerFilePath.
"/res/images/$FileName";
130 if( file_exists( $RealFilePath ) ===
false )
132 throw(
new Exception(
"File '$FileName' was not found" ) );
135 return( $RealFilePath );
137 catch( Exception $e )
169 $FileName = $Settings->get_setting(
'file_name' );
171 if( $Settings->get_setting(
'package_name' ,
false ) === false )
173 $RealFilePath = $this->get_path_from_template();
178 $Settings->get_setting(
'package_name' ) , $Settings->get_setting(
'package_version' ,
'last' )
180 $RealFilePath = $PackageFilePath.
"/res/images/$FileName";
181 if( file_exists( $RealFilePath ) === false )
183 throw(
new Exception(
"File '$FileName' was not found" ) );
187 return( $RealFilePath );
189 catch( Exception $e )
222 $Settings->get_setting(
'package_name' ) ,
223 $Settings->get_setting(
'package_version' ,
'last' )
226 return( $RealPackagePath );
228 catch( Exception $e )