ConditionTestNoExistingType.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php
  2. 8.9.x core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php
  3. 11.x core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php

Namespace

Drupal\condition_test\Plugin\Condition

File

core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php

View source
<?php

namespace Drupal\condition_test\Plugin\Condition;

use Drupal\Core\Condition\Attribute\Condition;
use Drupal\Core\Condition\ConditionPluginBase;
use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Provides a condition that has a no existing context.
 */
class ConditionTestNoExistingType extends ConditionPluginBase {
    
    /**
     * {@inheritdoc}
     */
    public function evaluate() {
        return TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    public function summary() {
        return $this->t('Condition that requires a non-existent context.');
    }

}

Classes

Title Deprecated Summary
ConditionTestNoExistingType Provides a condition that has a no existing context.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.