@param $name

@return FormElementDefinition
@throws CMDLParserException
554236
public function getFormElementDefinition($name)
    {
        if (array_key_exists($name, $this->namedFields)) {
            return $this->namedFields[$name];
        }

        throw new CMDLParserException('Could not find a formelement named ' . $name,
            CMDLParserException::CMDL_FORMELEMENT_NOT_FOUND);
    }
865885
public static function create($name) {
    $name = (string) $name;
    $name = ltrim($name, '\\');
    $namespace_node = Parser::parseSnippet("namespace $name;");
    return $namespace_node;
  }
892924
public function getParser($name)
    {
        if (!isset($this->instances[$name])) {
            if (!isset($this->mapping[$name])) {
                return null;
            }
            $class = $this->mapping[$name];
            $this->instances[$name] = new $class();
        }

        return $this->instances[$name];
    }
1116079
public static function getFormatTemplate($name) {
        $file = sprintf(
            '%s/Model/template/format/%s.html',
            __DIR__,
            $name
        );

        if (!file_exists($file)) {
            return null;
        }

        if (!isset(self::$templates[$name])) {
            self::$templates[$name] = file_get_contents($file);
        }

        return self::$templates[$name];
    }
75876
protected function getForm($name)
    {
        if (!isset($this->form[$name])) {
            $this->form[$name] = $this->getServiceLocator()
                    ->get($this->getModuleNamespace() . '\Form\\' . $name);
        }
        return $this->form[$name];
    }
1034372
public function getDefinition($name)
    {
        if (!$this->hasDefinition($name)) {
            throw new DcGeneralInvalidArgumentException('Data definition ' . $name . ' is not contained.');
        }

        return $this->definitions[$name];
    }
1263321
public function endElement($parser, $name)
    {
        switch ($name) {
            case 'P':
                $this->appendBlockText("\n\n");

                break;
            case 'UL':
                $this->appendBlockText("\n\n");

                break;
            case 'LI':
                $this->appendBlockText("\n");

                break;
            case 'DIV':
                $this->appendBlockText("\n\n\n");

                break;
            case 'A':
                $attrs = $this->blockAttributesStack->top();

                if (isset($attrs['HREF'])) {
                    $this->appendBlockText(" ({$attrs['HREF']})");
                }
        }

        $blockContent = $this->blockFinished();

        if (count($this->transformedTextStack)) {
            $this->appendBlockText($blockContent);
        } else {
            $this->text .= $blockContent;
        }
    }
772949
static function laraform($name = null) {
        $el = new ElementDaterangepickerTwbs($name);
        $el->setWrapClass('js-daterangepicker-twbs');
        $el->putTextTwbs('from')->setAttribute('style','display:none');
        $el->putTextTwbs('to')->setAttribute('style','display:none');
        $el->putStaticTwbs('<div class="col-lg-12"><i class="fa fa-calendar"></i>&nbsp;<span></span> <b class="caret"></b></div>');
        //$el->putStaticTwbs('<i class="fa fa-calendar"></i>&nbsp;<span></span> <b class="caret"></b>');
        return $el;
    }
249826
public function getParser($name)
    {
        if ($this->hasParser($name) === false) {
            throw new \InvalidArgumentException(sprintf('The Markdown parser "%s" is not found.', $name));
        }

        return $this->parsers->get($name);
    }
323149
public function getForm(string $name = null, array $options = []): Form
    {
        $name               = $name ?? $this->form ?? $this->serviceAlias;
        $sl                 = $this->getServiceLocator();
        $formElementManager = $sl->get('FormElementManager');
        $argv               = compact('options');
        $argv               = $this->prepareEventArguments($argv);

        $this->getEventManager()->trigger(self::EVENT_PRE_FORM_INIT, $this, $argv);

        /* @var $form Form */
        $form = $formElementManager->get($name, $options);
        $argv = compact('form', 'options');
        $argv = $this->prepareEventArguments($argv);

        $this->getEventManager()->trigger(self::EVENT_POST_FORM_INIT, $this, $argv);

        return $form;
    }
668804
public function addMultipleSelect(string $name) : Element\Select\MultipleSelect
    {
        $select = new Element\Select\MultipleSelect($this, $name . '[]');
        $this->addComponent($name, $select);

        return $select;
    }
883604
protected function createComponentSignInForm($name)
    {
        $form = new UI\Form();

        $form->getElementPrototype()->action = $this->link('default', array(
            'path' => 'loginfe',
            'abbr' => $this->abbr,
            'do' => 'signInForm-submit',
        ));

        $form->setRenderer(new BootstrapRenderer());

        $form->addText('username', 'Přihlašovací jméno')
            ->setRequired('Please provide a username.')
            ->setAttribute('placeholder', 'Přihlašovací jméno');

        $form->addPassword('password', 'Heslo')
            ->setRequired('Please provide a password.')
            ->setAttribute('placeholder', 'Heslo');

        $form->addCheckbox('remember', 'Permanent login?');

        $form->addSubmit('send', 'Přihlásit');

        $form->onSuccess[] = callback($this, 'signInFormSubmitted');

        return $form;
    }
57618
public function getControl($name) {
		
		if (substr($name, -2) == '[]') {
			$name = substr($name, 0, -2);
		}
		
		if ($this->controlExists($name)) {
			return $this->controls[$name];
		} else {
			$log = Logger::getInstance();
			$log->addError('Field control “' . $name . '” has not been defined in Form object'); 
			return NULL;
		}
		
	}
347577
public function findFormControlByName(string $name): ?Control
  {
    foreach ($this->controls as $control)
    {
      if ($control->name===$name) return $control;

      if ($control instanceof ComplexControl)
      {
        $tmp = $control->findFormControlByName($name);
        if ($tmp) return $tmp;
      }
    }

    return null;
  }
366951
public function createElement($name)
    {
        $elementClass = $this->classNameResolver->resolveElement($name);

        return $this->instantiateElement($elementClass);
    }
511230
static function laraform($name = '', $options) {
        $gr = new ElementGroupCheckboxButtonTwbs($name);
        $gr->setAttribute('data-toggle', 'buttons');
        foreach ($options as $k => $v) {
            $gr->putCheckboxTwbs($k, $k)
                ->setAttribute('autocomplete', 'off')
                ->setLabel($v);
        }
        return $gr;
    }
698924
public function findCommand(string $name): CommandInterface
    {
        [$section, $command] = explode('/', $name);

        return $this->stage->getSection($section)->getCommand($command);
    }