/** * Change the map height unit from integer to serialized array for inputUnit widget * * @since 1.8.0 */ protected function changeMapHeight() { $objModules = \ModuleModel::findAll(); if (!$objModules) { return; } while ($objModules->next()) { if (is_numeric($objModules->anystores_mapheight)) { $objModules->anystores_mapheight = serialize(array('unit' => 'px', 'value' => $objModules->anystores_mapheight)); $objModules->save(); } } }
public static function getModules($strType, $blnIncludeSubModules = true, $blnBackendModule = false) { $arrOptions = array(); if (!$blnIncludeSubModules) { if (($objModules = \ModuleModel::findByType($strType)) !== null) { $arrOptions = array_combine($objModules->fetchEach('id'), $objModules->fetchEach('name')); asort($arrOptions); } } else { if (($objModules = \ModuleModel::findAll()) !== null) { while ($objModules->next()) { if ($strClass = static::getModuleClass($strType)) { if (static::isSubModuleOf($objModules->type, $strClass, $blnBackendModule)) { $arrOptions[$objModules->id] = $objModules->name; } } } asort($arrOptions); } } return $arrOptions; }
protected function singleWizard($buffer) { $modules = \ModuleModel::findAll(); if ($modules) { while ($modules->next()) { if ($modules->deviceSelect && $modules->deviceSelect) { $this->loadLanguageFile('tl_module'); $option = 'value="' . $modules->id . '"'; $endTag = ')</option>'; $buffer = explode($option, $buffer); $i = 0; foreach ($buffer as &$row) { if ($i > 0) { $row = explode($endTag, $row); if ($modules->deviceSelect) { $devices = unserialize($modules->deviceSelect); if ($devices) { foreach ($devices as $device) { $row[0] .= ' || ' . $GLOBALS['TL_LANG'][$modules->current()->getTable()][$device]; } } } $row = implode($endTag, $row); } $i++; } $buffer = implode($option, $buffer); } } } return $buffer; }