Loading src/Plugin/designs/setting/BooleanSetting.php +10 −6 Original line number Diff line number Diff line Loading @@ -91,10 +91,14 @@ class BooleanSetting extends DesignSettingBase { $output = $this->renderer->render($build); // Process the rendered content using PHP coersion. $output = trim(strip_tags($output)); $result = filter_var($output, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); // Respond using the values provided by the configuration. if ($this->configuration['string']) { return ['#markup' => $result ? $this->configuration['on'] : $this->configuration['off']]; } return ['#markup' => $result]; } } Loading
src/Plugin/designs/setting/BooleanSetting.php +10 −6 Original line number Diff line number Diff line Loading @@ -91,10 +91,14 @@ class BooleanSetting extends DesignSettingBase { $output = $this->renderer->render($build); // Process the rendered content using PHP coersion. $output = trim(strip_tags($output)); $result = filter_var($output, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); // Respond using the values provided by the configuration. if ($this->configuration['string']) { return ['#markup' => $result ? $this->configuration['on'] : $this->configuration['off']]; } return ['#markup' => $result]; } }