Habari\FormContainer::move_into PHP Метод

move_into() публичный Метод

Move a control into the container
public move_into ( FormControl $control, FormContainer $target )
$control FormControl FormControl object to move
$target FormContainer FormContainer object acting as destination
    public function move_into(FormControl $control, FormContainer $target)
    {
        // Remove the source control from its container's list of controls
        $controls = array();
        foreach ($control->container->controls as $name => $ctrl) {
            if ($ctrl === $control) {
                continue;
            }
            $controls[$name] = $ctrl;
        }
        $control->container->controls = $controls;
        $target->controls[$control->name] = $control;
    }