public function open(ModelForm $form, $attributes = []) { if ($this->containers) { throw new \RuntimeException('Prior call to close() is required'); } if (is_string($attributes)) { $attributes = $this->parseAttributes($attributes); } foreach ($attributes as $attribute => $value) { $form->setAttribute($attribute, $value); } $this->containers[] = $form; return '<form' . $this->implodeAttributes($form->getAttributes()) . ">\n"; }