private static function maybe_set_properties_markup() { if (!empty(self::$_model['lead']->displet_user_properties)) { self::$_model['lead']->properties_markup = ''; $i = 1; foreach (self::$_model['lead']->displet_user_properties as $property) { if ($i === 11) { self::$_model['lead']->properties_markup .= self::get_view_all_markup_start(); } if (!empty($property['url'])) { $property['address'] = !empty($property['address']) ? $property['address'] : 'Property'; $location = DispletRetsIdxUtilities::get_address_from_property_details_suffix($property['url']); self::$_model['lead']->properties_markup .= '<a href="' . self::$_model['property_details_page_url'] . $property['url'] . '" target="_blank">' . $property['address'] . ', ' . $location['city'] . ', ' . $location['state'] . ' ' . $location['zip'] . '</a><br>'; } $i++; } if ($i > 10) { self::$_model['lead']->properties_markup .= self::get_view_all_markup_end(); } } }