本文整理汇总了PHP中AdminHelper::modelImageMinDimensions方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::modelImageMinDimensions方法的具体用法?PHP AdminHelper::modelImageMinDimensions怎么用?PHP AdminHelper::modelImageMinDimensions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminHelper
的用法示例。
在下文中一共展示了AdminHelper::modelImageMinDimensions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trans
}
$type = $field->type;
if (in_array($type, array('checkbox'))) {
$infoClass = "checkInfo";
}
$showInfo = false;
if ((!$field->hiddenInfo || $object->id && !$field->hiddenInfo->edit || !$object->id && !$field->hiddenInfo->add) && $field->info) {
$showInfo = true;
}
$infoSpans = "";
//info
if ($field->info || $field->specialInfo || $field->showDimensions) {
if ($showInfo) {
$infoSpans .= "<span class='info " . $infoClass . $infoWidthClass . "'>" . $field->info . "</span>";
}
if ($type == 'image' && $modelConfig->name == 'ModelImage' && ($dimensions = AdminHelper::modelImageMinDimensions())) {
if ($dimensions[2] == 'resize') {
$infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px width</strong> OR <strong>" . $dimensions[1] . "px height</strong></span>";
} else {
if ($dimensions[2] == 'minWidth') {
$infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px width</strong></span>";
} else {
if ($dimensions[2] == 'minHeight') {
$infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[1] . "px height</strong></span>";
} else {
$infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px</strong> x <strong>" . $dimensions[1] . "px</strong></span>";
}
}
}
} else {
if ($type == 'image' && $modelConfig->name != 'ModelImage') {