You are here

EntityTestCondition.php in Page Manager 8.4

File

tests/modules/page_manager_routing_test/src/Plugin/Condition/EntityTestCondition.php
View source
<?php

namespace Drupal\page_manager_routing_test\Plugin\Condition;

use Drupal\Core\Condition\ConditionPluginBase;

/**
 * @todo.
 *
 * @Condition(
 *   id = "page_manager_routing_test__entity_test",
 *   label = @Translation("Entity Test"),
 *   context_definitions = {
 *     "entity_test" = @ContextDefinition("entity:entity_test")
 *   }
 * )
 */
class EntityTestCondition extends ConditionPluginBase {

  /**
   * {@inheritdoc}
   */
  public function evaluate() {
    return (bool) $this
      ->getContext('entity_test');
  }

  /**
   * {@inheritdoc}
   */
  public function summary() {
    return '';
  }

}

Classes

Namesort descending Description
EntityTestCondition @todo.