protected function getListGridArticle(&$objTemplate, $arrArticle, $objModule)
 {
     if (!$objModule->addListGrid) {
         return;
     }
     $objConfig = \HeimrichHannot\ListGrid\ListGridModel::findByPk($objModule->listGrid);
     if ($objConfig === null) {
         return;
     }
     $objConfigItems = \HeimrichHannot\ListGrid\ListGridContentModel::findPublishedByPidAndTypes($objConfig->id, array('listgrid_news'), 1, $objTemplate->count - 1);
     if ($objConfigItems === null) {
         return;
     }
     // overwrite template
     $objTemplate->setName($objConfigItems->news_template);
     // overwrite image size
     if ($objTemplate->addImage && $objConfigItems->size != '') {
         $size = deserialize($objConfigItems->size);
         if ($size[0] > 0 || $size[1] > 0 || is_numeric($size[2])) {
             $arrArticle['singleSRC'] = $objTemplate->singleSRC;
             $arrArticle['size'] = $objConfigItems->size;
             $this->addImageToTemplate($objTemplate, $arrArticle);
         }
     }
 }
 public function getListGridConfigurations()
 {
     $arrOptions = array();
     $objConfigs = \HeimrichHannot\ListGrid\ListGridModel::findAll();
     if ($objConfigs === null) {
         return $arrOptions;
     }
     while ($objConfigs->next()) {
         $strType = $GLOBALS['TL_LANG']['LISTGRID_TYPES'][$objConfigs->type];
         $arrOptions[$strType ? $strType : $objConfigs->type][$objConfigs->id] = $objConfigs->title;
     }
     return $arrOptions;
 }
 public static function getConfigItemTypesByPid($intPid)
 {
     $groups = array();
     $objConfig = \HeimrichHannot\ListGrid\ListGridModel::findByPK($intPid);
     if ($objConfig === null) {
         return $groups;
     }
     $arrAdded = array();
     foreach ($GLOBALS['TL_CTE'] as $k => $v) {
         foreach (array_keys($v) as $kk) {
             $groups[$k][] = $kk;
             $arrAdded[] = $kk;
         }
     }
     return $groups;
 }