id, $this->class, ); if ($this->textPosition) { $cssClasses[] = $this->textPosition; } if ($this->valign) { $cssClasses[] = $this->valign; } if ($this->valignCenter) { $cssClasses[] = '-valign-center'; } $imageFiles = array(); $videoFiles = array(); if (is_array($this->backgroundImage)) { foreach (\FilesModel::findMultipleByUuids($this->backgroundImage) as $file) { if (in_array( $file->extension, array_map('trim', explode(',', \Config::get('validImageTypes'))) )) { $imageFiles[] = $file; } else { $videoFiles[] = $file; } } } $imgColStyle = ''; if (count($imageFiles) && $image = $this->getImageObject($imageFiles[0]->uuid, $this->backgroundImageSize)) { $imgColStyle .= 'background-image: url("' . $image->src . '");'; } if ((count($imageFiles) || count($videoFiles)) && $this->backgroundSize) { $imgColStyle .= 'background-size: ' . $this->backgroundSize . ';'; } if ((count($imageFiles) || count($videoFiles)) && $this->backgroundPosition) { $imgColStyle .= 'background-position: ' . $this->backgroundPosition . ';'; } $style = ''; if (!count($videoFiles) && !count($imageFiles)) { $style .= $imgColStyle; } ?> block('content'); ?>