adds condition to Parsedown include
This commit is contained in:
parent
e7a3707799
commit
7ce33f02ff
|
@ -12,15 +12,23 @@ use Omeka\Stdlib\ErrorStore;
|
|||
use Laminas\Form\FormElementManager;
|
||||
use TechDocument\Form\TechDocumentBlockForm;
|
||||
|
||||
|
||||
//require_once(dirname(__DIR__, 3) . '/vendor/erusev/parsedown/Parsedown.php');
|
||||
//require_once(dirname(__DIR__, 3) . '/vendor/mpdf/mpdf/src/Mpdf.php');
|
||||
require_once(dirname(__DIR__, 3) . '/vendor/autoload.php');
|
||||
use Parsedown;
|
||||
|
||||
//use Module\vendor\parsedown\Parsedown;
|
||||
//use Module\vendor\mpdf\Mpdf;
|
||||
|
||||
$list_of_includes = get_included_files();
|
||||
$parsedown_included=false;
|
||||
foreach ($list_of_includes as $file_path) {
|
||||
if (false !== strpos($file_path, "Parsedown.php")) {
|
||||
$parsedown_included=true;
|
||||
}
|
||||
}
|
||||
if ($parsedown_included == false){
|
||||
require_once(dirname(__DIR__, 3) . '/vendor/autoload.php');
|
||||
}
|
||||
use Parsedown;
|
||||
|
||||
|
||||
class TechDocument extends AbstractBlockLayout
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue