To register a custom node type, use the phpcr:node-type:register console command (use help phpcr:node-type:register for the syntax; see Tools for more information).
$constraints = new Collection(
[
'hazardous' => [
new Optional(new Type(['type' => 'boolean'])),
],
]
);
$errors = $this->validate(['hazardous'=>$request->get('hazardous', false)], $constraints);
if ($errors) {
return $this->json($errors, 400);
}
$isHazardous = filter_var($request->get('hazardous', false), FILTER_VALIDATE_BOOLEAN);
dump($isHazardous);
/**
* @Route("/neo/fastest/{hazardous}", name="neo_fastest", defaults={"hazardous"="0"}, requirements={"hazardous"="0|1"})
*/
public function getFastestNearEarthObject(bool $hazardous)
{
// ...
}
<label class="frt-checkbox-color " style="background: #A52A2A;" title="Brown">
<input class="frt-checkbox-color__input" style="display: block !important;"
type="checkbox" onclick="javascript:window.location.href=this.parentElement.getElementsByTagName('A')[0].href; return false;" value="brown" />
<a class="frt-checkbox-color__title" href="/bedroom-furniture/beds/sleigh-beds/filter-brown">
<span>Brown</span>
</a>
</label>