@php $categories = get_property_categories(['indent' => '↳', 'conditions' => ['status' => \Botble\Base\Enums\BaseStatusEnum::PUBLISHED]]); $backgroundImage = $shortcode->background_image ?: theme_option('home_banner'); $enableProjectsSearch = $shortcode->enable_search_projects_on_homepage_search ? $shortcode->enable_search_projects_on_homepage_search == 'yes' : theme_option('enable_search_projects_on_homepage_search', 'yes') == 'yes'; $defaultSearchType = $shortcode->default_home_search_type ?: theme_option('default_home_search_type', 'project'); $images = []; $quantity = min((int) $shortcode->quantity, 20); if ($quantity) { for ($i = 1; $i <= $quantity; $i++) { $images[] = RvMedia::getImageUrl($shortcode->{'image_' . $i}); } } $images = ! empty($images) ? array_filter($images) : []; $seconds = (int) $shortcode->seconds ?: 5; $enableChangeBackground = $shortcode->enable_change_image_background ?: 'no'; $tabs = ['project', 'sale', 'rent']; if (! RealEstateHelper::isEnabledProjects() || ! $enableProjectsSearch) { $enableProjectsSearch = false; $tabs = array_filter($tabs, function ($tab) { return $tab !== 'project'; }); } $tabs = array_filter($tabs, function ($tab) { return $tab == 'project' || in_array($tab, RealEstateHelper::enabledPropertyTypes()); }); $tabs = array_values($tabs); @endphp