M N 6 S 6 O 7 T 7 P 8 Tu 8 Q mmenuSkR S : S : T ; T( ; U QfV W = S = X > T > Y ? Tu ? Z [ \ A S A ] B T8 B ^ _ ` D S D a E T E b F Tu F c xd e H S H f I TH I g doctrineh i K S K j L T L k M Tu M l m n O S O o P Th P p dgeneratq r R S R s S T S t T Tu T u setsequev w V S V x W Tx W y iercolumz { Y S Y | Z T Z } [ Tu [ ~ idgenera ] S ] ^ T ^ nuLangs ` S ` a T a b Tu b ddedclas d S d e T e "YlU g S g h T h i Tu i ap nuSki k S k l T" l BBGg@ n S n o T o p Tu p r S r s T$ s 'mmeP x isinherix y G u S u v Tu v dclassesy z S ` z { T { | T' | dgenerat ` ~ S ~ TP( tion SWI ` S Tu Iyp`Q S ` T Tu ` S TX- ion W + S ` T Tu ence\Pro ` S T80 S ` T Tu n '=>1, ` S TH2 'autogridRowStart'] : null); unset($GLOBALS['PCT_AUTOGRID_DATA_COLLECTOR'][$k]); $objAutoGrid->stop = true; } // Grid presets if($objRow->type == 'autogridGridStart') { $arrGridPreset = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid] ?: array(); // grid preset default values if( empty($objRow->autogrid_tablet) && empty($arrGridPreset) === false ) { $objRow->autogrid_tablet = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid]['grid']['tablet']; } if( empty($objRow->autogrid_mobile) && empty($arrGridPreset) === false ) { $objRow->autogrid_mobile = $GLOBALS['PCT_AUTOGRID']['GRID_PRESETS'][$objRow->autogrid_grid]['grid']['mobile']; } // @var object $objGrid = new \StdClass; $objGrid->config = $arrGridPreset; $objGrid->name = $objRow->autogrid_grid; $objGrid->desktop = $objRow->autogrid_css; $objGrid->tablet = $objRow->autogrid_tablet; $objGrid->mobile = $objRow->autogrid_mobile; if( !empty($arrGridPreset) ) { // compile grid classes if( $objRow->autogrid_css ) { $objGrid->desktop = 'd_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_css),'_'); } if( $objGrid->tablet ) { $objGrid->tablet = 't_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_tablet),'_'); } if( $objGrid->mobile ) { $objGrid->mobile = 'm_'.rtrim(str_replace(array('%',' '), array('_'), $objRow->autogrid_mobile),'_'); } // add to classes $arrClasses = array_merge($arrClasses, array($objGrid->desktop,$objGrid->tablet,$objGrid->mobile) ); // override AutoGrid vars $objAutoGrid->desktop = $objGrid->desktop; $objAutoGrid->tablet = $objGrid->tablet; $objAutoGrid->mobile = $objGrid->mobile; } // flag as custom grid definition else { $objGrid->isCustomGrid = true; } if( trim($objRow->autogrid_css) != trim($arrGridPreset['grid']['desktop']) ) { $objAutoGrid->hasCustomGrid = true; } // add to AutoGrid object $objAutoGrid->Grid = $objGrid; } else { $arrClasses[] = $objRow->autogrid_css; $arrClasses[] = $objRow->autogrid_tablet; $arrClasses[] = $objRow->autogrid_mobile; } // append more classes $arrClasses = array_merge($arrClasses, array($objRow->autogrid_offset,$objRow->autogrid_align,@$objAutoGrid->align_mobile,$objRow->autogrid_gutter,$objRow->autogrid_class)); // collect styles $arrStyles = array(); // color $arrColor = StringUtil::deserialize($objRow->autogrid_bgcolor) ?: array(); if( empty(array_filter($arrColor)) === false ) { $color = $arrColor[0]; $rgb = array(); //-- @see Contao\StyleSheets::convertHexColor // Try to convert using bitwise operation if (strlen($color) == 6) { $dec = hexdec($color); $rgb['red'] = 0xFF & ($dec >> 0x10); $rgb['green'] = 0xFF & ($dec >> 0x8); $rgb['blue'] = 0xFF & $dec; } // Shorthand notation elseif (strlen($color) == 3) { $rgb['red'] = hexdec(str_repeat(substr($color, 0, 1), 2)); $rgb['green'] = hexdec(str_repeat(substr($color, 1, 1), 2)); $rgb['blue'] = hexdec(str_repeat(substr($color, 2, 1), 2)); } //-- $alpha = '1'; if($arrColor[1]) { $alpha = (int)$arrColor[1] / 100; } $style = 'background-color:rgba('.implode(',', $rgb).','.$alpha.');'; $arrStyles['background-color'] = $style; } // background image if( empty($objRow->autogrid_bgimage) === false ) { $objFile = FilesModel::findByPath($objRow->autogrid_bgimage); if ( (boolean)Validator::isStringUuid($objRow->autogrid_bgimage) === true ) { $objFile = FilesModel::findByUuid($objRow->autogrid_bgimage); } if( $objFile === null && \file_exists(TL_ROOT.'/'.$objRow->autogrid_bgimage) === true ) { $objFile = \Contao\Dbafs::addResource($objRow->autogrid_bgimage); } if( $objFile !== null ) { $style = "background-image:url('".$objFile->path."');"; $arrStyles['background-image'] = $style; // generate an image object $tmp = new \StdClass; // add image to temp object \Contao\Controller::addImageToTemplate( $tmp, array('singleSRC' => $objFile->path) ); $objAutoGrid->Image = $tmp; unset($tmp); } // check if column is empty or not $objNext = null; if( in_array($objRow->ptable, array('tl_article','tl_news','tl_calender_events')) === true || empty($objRow->ptable) === true ) { $objNext = ContentModel::findNextPublished($objRow); } if( in_array($objNext->type, $GLOBALS['PCT_AUTOGRID']['wrapperElements']) === false || $objNext->type == 'autogridRowStart' ) { $objAutoGrid->hasContent = true; } } // background position if($objRow->autogrid_bgposition) { $style = 'background-position:'.$objRow->autogrid_bgposition.';'; $arrStyles['background-position'] = $style; } // background repeat if($objRow->autogrid_bgrepeat) { $style = 'background-repeat:'.$objRow->autogrid_bgrepeat.';'; $arrStyles['background-repeat'] = $style; } // background size if($objRow->autogrid_bgsize) { $style = 'background-size:'.$objRow->autogrid_bgsize.';'; $arrStyles['background-size'] = $style; } // padding if($objRow->autogrid_padding) { $tmp = array_filter( StringUtil::deserialize($objRow->autogrid_padding) ?: array() ); $unit = $tmp['unit'] ?? ''; unset($tmp['unit']); foreach($tmp as $k => $v) { $arrStyles['padding-'.$k] = 'padding-'.$k.':'.$v.$unit.';'; } } // custom styles if($objRow->autogrid_styles) { $arrStyles['custom'] = $objRow->autogrid_styles; } // clean up $arrStyles = array_filter(array_map('trim',$arrStyles)); if(!empty($arrStyles)) { $objAutoGrid->hasStyles = true; $objAutoGrid->styles = $arrStyles; } // compile css classes $objAutoGrid->classes = implode(' ', array_unique( array_filter($arrClasses) ) ); $objTemplate->AutoGrid = $objAutoGrid; return $objTemplate; } }
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.