public function FormFieldRegistry::remove in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dom-crawler/FormFieldRegistry.php \Symfony\Component\DomCrawler\FormFieldRegistry::remove()
Removes a field and its children from the registry.
Parameters
string $name The fully qualified name of the base field:
Throws
\InvalidArgumentException when the name is malformed
File
- vendor/
symfony/ dom-crawler/ FormFieldRegistry.php, line 58
Class
- FormFieldRegistry
- This is an internal class that must not be used directly.
Namespace
Symfony\Component\DomCrawlerCode
public function remove($name) {
$segments = $this
->getSegments($name);
$target =& $this->fields;
while (count($segments) > 1) {
$path = array_shift($segments);
if (!array_key_exists($path, $target)) {
return;
}
$target =& $target[$path];
}
unset($target[array_shift($segments)]);
}