Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

BlockedIps.php

Namespace

Drupal\ban\Plugin\migrate\source\d7

File

core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php

View source
<?php

namespace Drupal\ban\Plugin\migrate\source\d7;

use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;

/**
 * Drupal 7 blocked IPs source from database.
 *
 * For available configuration keys, refer to the parent classes.
 *
 * @see \Drupal\migrate\Plugin\migrate\source\SqlBase
 * @see \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
 *
 * @MigrateSource(
 *   id = "d7_blocked_ips",
 *   source_module = "system"
 * )
 */
class BlockedIps extends DrupalSqlBase {
    
    /**
     * {@inheritdoc}
     */
    public function query() {
        return $this->select('blocked_ips', 'bi')
            ->fields('bi', [
            'ip',
        ]);
    }
    
    /**
     * {@inheritdoc}
     */
    public function fields() {
        return [
            'ip' => $this->t('The blocked IP address.'),
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getIds() {
        return [
            'ip' => [
                'type' => 'string',
            ],
        ];
    }

}

Classes

Title Deprecated Summary
BlockedIps Drupal 7 blocked IPs source from database.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal