Commit 547ace58 authored by alexpott's avatar alexpott

Revert "Issue #2811519 by tim.plunkett, dbourrion, cilefen, futurmat: Blocks...

Revert "Issue #2811519 by tim.plunkett, dbourrion, cilefen, futurmat: Blocks do not appear after being placed with the Rules module enabled (or other missing schemata for Condition plugins)"

This reverts commit ed3202c3.
parent ed3202c3
......@@ -323,7 +323,7 @@ protected function validateVisibility(array $form, FormStateInterface $form_stat
// However, certain form elements may return it as 0/1. Cast here to
// ensure the data is in the expected type.
if (array_key_exists('negate', $values)) {
$form_state->setValue(['visibility', $condition_id, 'negate'], (bool) $values['negate']);
$values['negate'] = (bool) $values['negate'];
}
// Allow the condition to validate the form.
......
<?php
namespace Drupal\block_test\Plugin\Condition;
use Drupal\Core\Condition\ConditionPluginBase;
/**
* Provides a 'missing_schema' condition.
*
* @Condition(
* id = "missing_schema",
* label = @Translation("Missing schema"),
* )
*/
class MissingSchema extends ConditionPluginBase {
/**
* {@inheritdoc}
*/
public function evaluate() {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function summary() {
return 'Summary';
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment