xandeadx

MiMo V2.5 (free)

Jun 26th, 2026 (edited)
58
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.15 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Drupal\current_date\Plugin\Block;
  4.  
  5. use Drupal\Core\Block\Attribute\Block;
  6. use Drupal\Core\Block\BlockBase;
  7. use Drupal\Core\Cache\Cache;
  8. use Drupal\Core\Datetime\DateFormatterInterface;
  9. use Drupal\Core\Entity\EntityTypeManagerInterface;
  10. use Drupal\Core\Form\FormStateInterface;
  11. use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
  12. use Drupal\Core\StringTranslation\TranslatableMarkup;
  13. use Symfony\Component\DependencyInjection\ContainerInterface;
  14.  
  15. /**
  16.  * Provides a block that displays the current date.
  17.  */
  18. #[Block(
  19.  id: "current_date_block",
  20.   admin_label: new TranslatableMarkup("Current date"),
  21. )]
  22. class CurrentDateBlock extends BlockBase implements ContainerFactoryPluginInterface {
  23.  
  24.   /**
  25.    * Constructs a CurrentDateBlock instance.
  26.    */
  27.   public function __construct(
  28.     array $configuration,
  29.     $plugin_id,
  30.     $plugin_definition,
  31.     protected DateFormatterInterface $dateFormatter,
  32.     protected EntityTypeManagerInterface $entityTypeManager,
  33.   ) {
  34.     parent::__construct($configuration, $plugin_id, $plugin_definition);
  35.   }
  36.  
  37.   /**
  38.    * {@inheritdoc}
  39.    */
  40.   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  41.     return new static(
  42.       $configuration,
  43.       $plugin_id,
  44.       $plugin_definition,
  45.       $container->get('date.formatter'),
  46.       $container->get('entity_type.manager'),
  47.     );
  48.   }
  49.  
  50.   /**
  51.    * {@inheritdoc}
  52.    */
  53.   public function defaultConfiguration() {
  54.     return [
  55.       'date_format' => 'long',
  56.       'label_display' => '',
  57.     ];
  58.   }
  59.  
  60.   /**
  61.    * {@inheritdoc}
  62.    */
  63.   public function blockForm($form, FormStateInterface $form_state) {
  64.     $form['date_format'] = [
  65.       '#type' => 'select',
  66.       '#title' => $this->t('Date format'),
  67.       '#description' => $this->t('Select the format in which to display the date.'),
  68.       '#default_value' => $this->configuration['date_format'],
  69.       '#options' => $this->getDateFormatOptions(),
  70.     ];
  71.     return $form;
  72.   }
  73.  
  74.   /**
  75.    * {@inheritdoc}
  76.    */
  77.   public function blockSubmit($form, FormStateInterface $form_state) {
  78.     $this->configuration['date_format'] = $form_state->getValue('date_format');
  79.   }
  80.  
  81.   /**
  82.    * {@inheritdoc}
  83.    */
  84.   public function build() {
  85.     $formatted_date = $this->dateFormatter->format(
  86.       time(),
  87.       $this->configuration['date_format'],
  88.     );
  89.  
  90.     return [
  91.       '#markup' => $formatted_date,
  92.     ];
  93.   }
  94.  
  95.   /**
  96.    * {@inheritdoc}
  97.    */
  98.   public function getCacheContexts() {
  99.     return Cache::mergeContexts(
  100.       parent::getCacheContexts(),
  101.       ['timezone', 'languages:language_interface'],
  102.     );
  103.   }
  104.  
  105.   /**
  106.    * {@inheritdoc}
  107.    */
  108.   public function getCacheMaxAge() {
  109.     return 0;
  110.   }
  111.  
  112.   /**
  113.    * Returns available date format options.
  114.    *
  115.    * @return array
  116.    *   An associative array of date format ID => label.
  117.    */
  118.   protected function getDateFormatOptions() {
  119.     $formats = $this->entityTypeManager->getStorage('date_format')->loadMultiple();
  120.     $options = [];
  121.     foreach ($formats as $id => $format) {
  122.       $options[$id] = $format->label();
  123.     }
  124.     return $options;
  125.   }
  126.  
  127. }
  128.  
Advertisement
Comments
  • User was banned
  • D_Celcraft
    2 days
    # CSS 0.82 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://drive.google.com/file/d/1cvQPOZ7JecI0L6lqdIzIHJbHQBiDRT4U/view
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment