'label_attr' =>
[ 'class' => 'my&class',
],
]);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class required"][.="[trans]<b>Bolded label</b>[/trans]"]', 0
);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class required"]/b[.="Bolded label"]'
);
} protected function renderForm(FormView
$view, array
$vars =
[]) { return $this->renderer->
renderBlock($view, 'form',
$vars);
} protected function renderLabel(FormView
$view,
$label = null, array
$vars =
[]) { if (null !==
$label) { $vars +=
['label' =>
$label];
} return $this->renderer->
searchAndRenderBlock($view, 'label',
$vars);
}