Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/store/web/modules/contrib/commerce/modules/promotion/src/

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/commerce/modules/promotion/src/PromotionViewsData.php

<?php

namespace Drupal\commerce_promotion;

use Drupal\commerce\CommerceEntityViewsData;
use Drupal\Core\Field\FieldDefinitionInterface;

/**
 * Provides views data for promotions.
 */
class PromotionViewsData extends CommerceEntityViewsData {

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();

    // Use "enabled"/"disabled" rather than true/false for the promotion status.
    $data_table = $this->tableMapping->getDataTable();
    $data[$data_table]['status']['filter']['type'] = 'enabled-disabled';
    // Expose the offer as a select list.
    $data[$data_table]['offer__target_plugin_id']['filter']['id'] = 'list_field';
    $data[$data_table]['offer__target_plugin_id']['argument']['id'] = 'string_list_field';

    return $data;
  }

  /**
   * {@inheritdoc}
   */
  protected function processViewsDataForDatetime($table, FieldDefinitionInterface $field_definition, array &$views_field, $field_column_name) {
    parent::processViewsDataForDatetime($table, $field_definition, $views_field, $field_column_name);

    // Promotion date/time fields are always used in the store timezone.
    if ($field_column_name == 'value') {
      $views_field['field']['default_formatter'] = 'commerce_store_datetime';
      $views_field['filter']['id'] = 'commerce_store_datetime';
    }
  }

}

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