Creates an element that will be replaced by the new body in insertHTML.

@param string $name The name of the insert target.
@return HTML5DOMElement A new DOMElement that must be set in the place where the new body will be inserted.
161247
public function createInsertTarget(string $name)
    {
        if (!$this->loaded) {
            $this->loadHTML('');
        }
        $element = $this->createElement('html5-dom-document-insert-target');
        $element->setAttribute('name', $name);
        return $element;
    }
1371686
public function addInputImage(string $name) : Element\Input\Image
    {
        $input = new Element\Input\Image($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
667366
private function createNode($name, $entry = null, $entryAttribute = null)
    {
        $document = $this->getDocument();

        try {
            $node = $document->createElement($name);
        } catch (\DOMException $e) {
            $node = $document->createElement($entry ?: $this->entry);

            if (is_string($name)) {
                $node->setAttribute($entryAttribute ?: $this->entryAttribute, $name);
            }
        }

        return $node;
    }
321039
public function removeAttr(string $name): self {
        $this->collection()->each(function($node) use($name) {
            if ($node instanceof \DOMElement) {
                $node->removeAttribute($name);
            }
        });

        return $this;
    }
322297
public function addButtonButton(string $name) : Element\Button\Button
    {
        $button = new Element\Button\Button($this, $name);
        $this->addComponent($name, $button);

        return $button;
    }
689747
public function addInputRange(string $name) : Element\Input\Range
    {
        $input = new Element\Input\Range($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
76517
protected function createComponentForm(string $name): Form
    {
        $form = new Form($this, $name);
        $form->setTranslator($this->translator);
        $this->formContainer->getForm($form);

        $form->onSuccess[] = $this->eventContainer;
        return $form;
    }
153639
public function addInputReset(string $name) : Element\Input\Reset
    {
        $input = new Element\Input\Reset($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
1096983
public function addInputEmail(string $name) : Element\Input\Email
    {
        $input = new Element\Input\Email($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
1074666
private function createNode($name)
    {
        $treeBuilder = new TreeBuilder($name);
        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            $rootNode = $treeBuilder->root($name);
        }

        return $rootNode;
    }
350952
public function createElement(Node $parent, $name)
    {
        if (array_key_exists($name, $this->elementMap)) {
            $class = $this->elementMap[$name];

            return new $class($parent);
        }

        return null;
    }
1324461
function add($name, $container = null) {
        $method = \Str::studly('add_' . $name);
        if (!$container) {
            $container = $this->form;
        }

        $element = call_user_func([
            $this,
            $method
        ], $container);
        /* @var ElementTbText $element */
        $element->toggleFrozen(!$this->isFieldEnabled($name));
        if (!$element->getLabel()) {
            $element->setLabel($this->model->getEntityLabel($name));
        }
        return $element;
    }
477960
protected function addTabMenuItem($name)
    {
        if (is_object($name)) {
            $tab = $name;
        } else {
            $tab = new Tab($name);
        }

        $tab = $this->add([$tab, 'class' => ['item']], 'Menu')
            ->setElement('a')
            ->setAttr('data-tab', $tab->name);

        if (empty($this->activeTabName)) {
            $this->activeTabName = $tab->name;
        }

        return $tab;
    }
813004
public function addInputWeek(string $name) : Element\Input\Week
    {
        $input = new Element\Input\Week($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
868989
public function AddElement($name, $data)
    {
        $this->factory->addElement($this, $name, $data);
        return $this;
    }
683638
public function create($name)
    {
        $this->checkName($name);

        $configuration = new Configuration();

        $configuration->setName($name);

        $configuration->setModel($this->getParameter($name, 'model'));
        $configuration->setForm($this->getParameter($name, 'form'));
        $configuration->setFormTemplate($this->getParameter($name, 'template.form'));
        $configuration->setRecipientTemplate($this->getParameter($name, 'template.recipient'));
        $configuration->setRecipient($this->getParameter($name, 'recipient'));
        $configuration->setConfirmTemplate($this->getParameter($name, 'template.confirm'));
        $configuration->setPageTemplate($this->getParameter($name, 'template.page'));
        $configuration->setFrom($this->getParameter($name, 'from'));
        $configuration->setSenderName($this->getParameter($name, 'sender_name'));
        $configuration->setSubject($this->getParameter($name, 'subject'));
        $configuration->setTranslationDomain($this->getParameter($name, 'translation_domain'));
        $configuration->setConfirmMail($this->getParameter($name, 'confirm_mail'));

        return $configuration;
    }
81129
public function addTextarea(string $name) : Element\Textarea
    {
        $textarea = new Element\Textarea($this, $name);
        $this->addComponent($name, $textarea);

        return $textarea;
    }