AddressLookUpBlock.php in IP Geolocation Views & Maps 8
Namespace
Drupal\ip_geoloc\Plugin\BlockFile
src/Plugin/Block/AddressLookUpBlock.phpView source
<?php
namespace Drupal\ip_geoloc\Plugin\Block;
use Drupal\Core\Block\BlockBase;
/**
* Global IP address lookup.
*
* @Block(
* id = "address_lookup",
* admin_label = @Translation("Global IP address lookup"),
* category = @Translation("IP Geoloc"),
* )
*/
class AddressLookUpBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
// Calling the set location form in block.
$form = \Drupal::formBuilder()
->getForm('Drupal\\ip_geoloc\\Form\\GeoCodeAddressForm');
return $form;
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
return 0;
}
}
Classes
Name | Description |
---|---|
AddressLookUpBlock | Global IP address lookup. |