本文整理汇总了PHP中ModuleModel::findAll方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleModel::findAll方法的具体用法?PHP ModuleModel::findAll怎么用?PHP ModuleModel::findAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleModel
的用法示例。
在下文中一共展示了ModuleModel::findAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: changeMapHeight
/**
* 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();
}
}
}
示例2: getModules
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;
}
示例3: singleWizard
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;
}