Skip to content

Commit

Permalink
better image size handling and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
saibotd committed May 5, 2017
1 parent e8d7d24 commit c68405d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/ModuleHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace DieSchittigs\ContaoContentApi;

use Contao\ModuleModel;
use Contao\Module;

class ModuleHelper
{
public static function get($id)
{
$moduleModel = ModuleModel::findByPk($id);
$moduleClass = Module::findClass($moduleModel->type);
$module = new $moduleClass($moduleModel, $column);

$_module = Helper::toObj($moduleModel);
$_module->compiledHTML = Helper::replaceHTML(@$module->generate());

return $_module;
}
}

0 comments on commit c68405d

Please sign in to comment.