Results

06.09.2019
load_block_on_ajax 8.x-1.0 :: src/Plugin/Condition/LoadBlockOnAjax.php
    $pages = array_map('trim', explode("\n", $this->configuration['load_block_on_ajax']));
    $pages = implode(', ', $pages);
    if (!empty($this->configuration['negate'])) {
      return $this->t('Do not return true on the following pages: @pages', ['@pages' => $pages]);
    }
    return $this->t('Return true on the following pages: @pages', ['@pages' => $pages]);
  }

  /**
14.05.2019
mobile_device_detection 8.x-3.2 :: src/Plugin/Condition/MobileDeviceDetectionConditionPlugin.php
    if (!empty($this->configuration['negate'])) {
      return $this->t('The device is not @devices', ['@devices' => $devices]);
    }
    else {
      return $this->t('The device is @devices', ['@devices' => $devices]);
    }
  }
27.06.2024
block_condition_published 1.0.0-alpha2 :: src/Plugin/Condition/NodePublishedState.php
    $status = $this->configuration['is_published'];

    if (!empty($this->configuration['negate'])) {
      return $this->t('The published state is not @state', ['@state' => $status]);
    }
    return $this->t('The published state is @state', ['@state' => $status]);
  }

  /**
06.11.2019
access_conditions 8.x-1.x-dev :: src/Plugin/Condition/AccessModel.php
      '@access_models' => implode(',', $this->configuration['access_models']),
    ];
    if (!empty($this->configuration['negate'])) {
      return $this->configuration['operator'] == 'and' ?
        $this->t('All access models must pass: @access_models.', $t_args) :
        $this->t('Only one access model must pass: @access_models.', $t_args);
    }
    else {
      return $this->configuration['operator'] == 'and' ?
13.09.2020
access_filter 8.x-1.3 :: src/Plugin/AccessFilter/Condition/ConditionBase.php
   */
  public function isNegated() {
    return !empty($this->configuration['negate']);
  }

}
19.07.2024
acquia_vwo 1.0.x-dev :: src/Form/VisibilityForm.php
      // Due to strict type checking, cast negation to a boolean.
      $configuration['negate'] = (bool) (array_key_exists('negate', $configuration) ? $configuration['negate'] : FALSE);

      // Update the insertion conditions config.
      $conditions[$condition_id] = $configuration;
    }
    $config = $this->config('acquia_vwo.settings');
    $config->set('visibility.conditions', $conditions)->save();
16.12.2020
alert_types 8.x-1.x-dev :: src/Form/AlertForm.php
      $condition_configuration = $condition->getConfiguration();
      // Drupal core bug fix workaround, make sure that negate is always a boolean.
      if (isset($condition_configuration['negate'])) {
        $condition_configuration['negate'] = (bool) $condition_configuration['negate'];
      }
      $conditionCollection->addInstanceId($condition_id, $condition_configuration);
    }
    $conditions = $conditionCollection->getConfiguration();

    $entity->setConditions($conditions);
06.12.2021
association 1.0.0-alpha2 :: src/Utility/AssociationPathautoHelper.php
          $configuration = $condition->getConfiguration();
          $defaults['bundles'] = $configuration['bundles'];
          $defaults['mode'] = empty($configuration['negate']) ? 'selected' : 'negated';
          break;
        }
      }

      $bundleNames = [];
      foreach ($this->entityBundleInfo->getBundleInfo('association') as $bundle => $info) {
12.06.2023
betasite 1.0.4 :: src/Plugin/Condition/BetaSiteHostname.php
    $hostnames = $this->getNeededHostnames();
    $hostnames = implode(', ', $hostnames);
    if (!empty($this->configuration['negate'])) {
      return $this->t('Do not return true if the current request does not have any of the: @hostnames.', [
        '@hostnames' => $hostnames,
      ]);
    }
    return $this->t('Return true if the current request has any of the hostnames: @hostnames.', [
      '@hostnames' => $hostnames,
28.04.2020
block_country 2.0.0 :: src/Plugin/Condition/BlockCountry.php
   */
  public function evaluate() {
    if (empty($this->configuration['country_list']) && $this->configuration['negate'] == False) {
      return True;
    } else {
      $ip = $this->requestStack->getCurrentRequest()->getClientIp();
      $ret = true;
      if ($country = $this->ip2CountryLookUp->getCountry($ip)) {
        if (!in_array($country, $this->configuration['country_list']))  {
17.04.2021
block_in_page_403 1.0.x-dev :: src/Plugin/Condition/Page403Request.php
    public function summary()
    {
        if (!empty($this->configuration['negate'])) {
            return $this->t('Do not return true on the following page 403.');
        }
        return $this->t('Return true on the following page 403.');

    }
09.06.2020
block_in_page_not_found 8.x-4.1 :: src/Plugin/Condition/PageNotFoundRequest.php
    public function summary()
    {
        if (!empty($this->configuration['negate'])) {
            return $this->t('Do not return true on the following page not found.');
        }
        return $this->t('Return true on the following page not found.');

    }
17.09.2018
block_ipaddress 8.x-1.0-alpha3 :: src/Plugin/Condition/BlockIpaddress.php
   */
  public function evaluate() {
    if (empty($this->configuration['ipaddress']) && !$this->configuration['negate']) {
      return TRUE;
    }
    else {
      $should_display = FALSE;
      $config_ipaddress = array_map('trim', explode("\n", $this->configuration['ipaddress']));
      $client_ipaddress = $this->requestStack->getCurrentRequest()->getClientIp();
09.10.2021
bt_personas 2.0.0-alpha2 :: src/Plugin/Condition/UserPersona.php
      $personas = reset($personas);
    }
    if (!empty($this->configuration['negate'])) {
      return $this->t('The user is not a member of @personas', ['@personas' => $personas]);
    }
    else {
      return $this->t('The user is a member of @personas', ['@personas' => $personas]);
    }
  }
16.08.2022
childfocus_notfound 1.0.0 :: src/Plugin/Condition/ChildfocusPageNotFound.php
   */
  public function summary() {
    if (!empty($this->configuration['negate'])) {
      return $this->t('Do not return true on page not found.');
    }
    return $this->t('Return true on page not found.');

  }
11.07.2020
commerce_product_bundles 8.x-1.0 :: src/Plugin/Commerce/Condition/OrderProductBundleVariation.php
    $order = $entity;
    $product_ids = array_flip($this->getProductBundleVariationIds());
    $negate = $this->configuration['negate'];
    foreach ($order->getItems() as $order_item) {
      /** @var \Drupal\commerce_product_bundles\Entity\ProductBundleVariationInterface $purchased_entity */
      $purchased_entity = $order_item->getPurchasedEntity();
      if (!$purchased_entity || $purchased_entity->getEntityTypeId() !== 'commerce_bundle_variation') {
        continue;
      }
11.07.2020
commerce_product_bundles 8.x-1.0 :: src/Plugin/Commerce/Condition/OrderItemProductBundleVariation.php
    $product_ids = array_flip($this->getProductBundleVariationIds());

    if ($this->configuration['negate']) {
      return !isset($product_ids[$purchased_entity->id()]);
    }

    return isset($product_ids[$purchased_entity->id()]);
  }
11.07.2020
commerce_product_bundles 8.x-1.0 :: src/Plugin/Commerce/Condition/ProductBundleVariationTrait.php
      '#type' => 'checkbox',
      '#title' => $this->t('Negate'),
      '#default_value' => isset($this->configuration['negate']) ? $this->configuration['negate'] : 0,
    ];

    return $form;
  }

  /**
    // Set behavior.
    $this->configuration['negate'] = isset($values['negate']) ? $values['negate'] : 0;

  }

  /**
   * Gets the configured product bundle IDs.
   *
07.10.2020
commerce_shipping 8.x-2.0-rc2 :: src/Plugin/Commerce/Condition/ShipmentAddress.php
      '#title' => $this->t('Negate'),
      '#description' => $this->t('If checked, the value(s) selected should not match.'),
      '#default_value' => $this->configuration['negate'],
    ];

    return $form;
  }

  /**
    $this->configuration['zone'] = $values['zone'];
    $this->configuration['negate'] = $values['negate'];
  }

  /**
   * {@inheritdoc}
   */
  public function evaluate(EntityInterface $entity) {
    ] + $this->configuration['zone']);

    if ($this->configuration['negate']) {
      return !$zone->match($address);
    }

    return $zone->match($address);
  }
12.06.2022
commerce_tax_conditions 1.0.0 :: src/Plugin/Commerce/Condition/CustomerRoleCondition.php
      '#title' => $this->t('Negate the roles condition'),
      '#description' => $this->t('If checked, the value(s) selected should not match.'),
      '#default_value' => $this->configuration['negate'],
    ];

    return $form;
  }

  /**
    $values = $form_state->getValue($form['#parents']);
    $this->configuration['negate'] = $values['negate'];
  }

  /**
   * {@inheritdoc}
   */
  public function evaluate(EntityInterface $entity) {
    $result = (bool) array_intersect($this->configuration['roles'], $customer->getRoles());

    if ($this->configuration['negate']) {
      return !$result;
    }

    return $result;
  }

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc