t('Find an Agent - Map'), ); return $blocks; } function tc_find_an_agent_block_view($delta = '') { if ($delta == 'tc_find_an_agent') { $block = array( 'content' => array( '#markup' => _tc_find_an_agent_map_block_markup(), '#attached' => array( 'js' => array( '/sites/all/themes/custom/amrisk_theme/js/googlemaps.js', drupal_get_path('module', 'tc_find_an_agent'). '/js/tc-find-an-agent-map.compiled.js ', array('type' => 'setting', 'data' => array('agents' => _tc_find_an_agent_agents())) ) ) ) ); } return $block; } function _tc_find_an_agent_map_block_markup() { return '
'; } function _tc_find_an_agent_agents() { $cacheKey = 'tc_find_an_agent_agents'; if ($cached = cache_get($cacheKey)) $items = $cached - > data; else { $items = array(); $query = db_select('node', 'n') -> fields('n', array('nid')) -> condition('type', 'agent', '=') -> execute(); while ($record = $query - > fetchAssoc()) { $node = node_load($record['nid']); $items[] = array( 'id' => intval($node - > nid), 'title' => _tc_find_an_agent_clean($node - > title), 'address' => _tc_find_an_agent_clean($node - > field_faa_address['und'][0]['thoroughfare ']), 'city' => _tc_find_an_agent_clean($node - > field_faa_address['und'][0]['locality']), 'state' => _tc_find_an_agent_clean($node - > field_faa_address['und'][0]['administrat ive_area ']), 'zip' => intval($node - > field_faa_address['und'][0]['postal_code']), 'phone' => _tc_find_an_agent_clean($node - > field_faa_telephone['und'][0]['value']), 'lat' => floatval(number_format($node - > field_faa_geofield['und'][0]['lat'], 6)), 'lon' => floatval(number_format($node - > field_faa_geofield['und'][0]['lon'], 6)), 'type' => _tc_find_an_agent_clean($node - > field_agent_type['und'][0]['value']) ); } cache_set($cacheKey, $items, 'cache', 60 * 60 * 24); } return $items; } function _tc_find_an_agent_clean($string) { return preg_replace('/[^A-Za-z0-9\- \.\(\)\'"]/', '', $string); // Removes special chars . } PASCHAL INSURANCE AGENCY, LLC | American Risk Insurance Company, Inc.
Our size allows us to be large enough to be competitive and small enough to care.

PASCHAL INSURANCE AGENCY, LLC

ARI News

Posted by admin on Feb 17th, 2020

American Risk Insurance Company, Inc.

Read More
Posted by admin on Feb 26th, 2018

American Risk Insurance Company, Inc. (ARI) announced today it is offering Renters and Condominium Owner’s Insurance in the State of Texas.

Read More
Posted by admin on Nov 2nd, 2016

Demotech, a leading financial analysis firm specializing in evaluating the financial stability of regional and specialty insurers, has affirmed Ame

Read More