Пример #1
0
 if ($view_info_item['CONSTRAINWIDTH'] === '1') {
     $viewMgr->setWidthConstrain($view_info_item['ID'], 1);
 } else {
     if ($view_info_item['CONSTRAINWIDTH'] === '0') {
         $viewMgr->setWidthConstrain($view_info_item['ID'], 0);
     }
 }
 if ($view_info_item['CONSTRAINHEIGHT'] === '1') {
     $viewMgr->setHeightConstrain($view_info_item['ID'], 1);
 } else {
     if ($view_info_item['CONSTRAINHEIGHT'] === '0') {
         $viewMgr->setHeightConstrain($view_info_item['ID'], 0);
     }
 }
 if ($view_info_item['WIDTHCROP'] === '2') {
     $viewMgr->setWidthCrop($view_info_item['ID'], 2);
 } else {
     if ($view_info_item['WIDTHCROP'] === '1') {
         $viewMgr->setWidthCrop($view_info_item['ID'], 1);
     } else {
         if ($view_info_item['WIDTHCROP'] === '0') {
             $viewMgr->setWidthCrop($view_info_item['ID'], 0);
         }
     }
 }
 if ($view_info_item['HEIGHTCROP'] === '2') {
     $viewMgr->setHeightCrop($view_info_item['ID'], 2);
 } else {
     if ($view_info_item['HEIGHTCROP'] === '1') {
         $viewMgr->setHeightCrop($view_info_item['ID'], 1);
     } else {