Adds a submit button with a unique name
@param string $label The wording label used for the submit button
15634
protected function AddUniqueSubmit($label)
    {
        $name = $label . '-' . $this->Content()->GetID();
        $fullLabel = $this->Label($label);
        $this->AddSubmit($name, Trans($fullLabel));
    }
178620
public function setLabel( $label ) {
		$this->labelValue = (string)$label !== '' ? $label : null;

		$this->label->clearContent();
		if ( $this->labelValue !== null ) {
			if ( is_string( $this->labelValue ) && trim( $this->labelValue ) === '' ) {
				$this->label->appendContent( new HtmlSnippet( '&nbsp;' ) );
			} else {
				$this->label->appendContent( $label );
			}
		}

		$visibleLabel = $this->labelValue !== null && !$this->invisibleLabel;
		$this->toggleClasses( [ 'oo-ui-labelElement' ], $visibleLabel );

		return $this;
	}
485272
public function setLabel($label) {
        if (!is_string($label)) throw new IllegalTypeException('Illegal type of parameter $label: '.gettype($label));
        if (!strlen($label))    throw new InvalidArgumentException('Invalid argument $label: '.$label);

        $this->label = $label;
        return $this;
    }
372621
public function setLabel($label)
    {
        $this->textContent->prepend($label);
        $this->entity->setEntityName($label);

        return $this;
    }
933243
public function addParticipatePage($label)
    {
        $participate = $this->addContainer($label);
        $subscr = $participate->addPage($this->_('Subscribe'), 'pr.participate.subscribe', 'participate', 'subscribe');
        $subscr->addPage(null, 'pr.participate.subscribe', 'participate', 'subscribe-thanks');
        $unsub = $participate->addPage($this->_('Unsubscribe'), 'pr.participate.unsubscribe', 'participate', 'unsubscribe');
        $unsub->addPage(null, 'pr.participate.unsubscribe', 'participate', 'unsubscribe-thanks');

        return $participate;
    }
691585
public function withText(string $name, string $label)
    {
        $this->contentGroup->textAreas[$name] = ['name' => $name, 'label' => $label, 'order' => $this->order++];

        return $this;
    }
385927
public function setLabel($label)
    {
        if (!(is_scalar($label) || is_null($label))) {
            return false;
        }

        $this->label = $label;
    }
155593
def submit(label, *args)
      options = args.extract_options!
      new_class = options[:class] || Bootstrap3FormBuilder.default_submit_style
      super(label, *(args << options.merge(:class => new_class)))
    end
1114595
protected final function add_jumpto($name, $label=null, $selected=LESSON_NEXTPAGE) {
        $title = get_string("jump", "lesson");
        if ($label === null) {
            $label = $title;
        }
        if (is_int($name)) {
            $name = "jumpto[$name]";
        }
        $this->_form->addElement('select', $name, $label, $this->_customdata['jumpto']);
        $this->_form->setDefault($name, $selected);
        $this->_form->addHelpButton($name, 'jumps', 'lesson');
    }
814419
public function clickButton(string $label, int $indexOfButton = 0): void
    {
        $formButtons = $this->context->findAllElements($this->fields['button'], $this->context->findElement($this->fields['mainFormSection']));
        $filteredButtons = array_values(array_filter($formButtons, function ($element) use ($label) { return $element->getText() === $label; }));

        $filteredButtons[$indexOfButton]->click();
    }
1373265
public function addAskPage($label)
    {
        $page = $this->addPage($label, null, 'ask');

        // Routes for token controller
        $page->addAction(null, null, 'forward');
        $page->addAction(null, null, 'return');
        $page->addAction(null, null, 'to-survey')->setModelParameters(1);
        $page->addAction(null, null, 'token');

        return $page;
    }
533420
public function setLabel($label)
    {
        if (in_array(
            $label,
            $this->validLabels
        )) {
            $this->label = $label;
        }

        return $this;
    }
662262
public function setLabel( $label ) {
		if ( $this->useInputTag ) {
			// Discard non-plaintext labels
			if ( !is_string( $label ) ) {
				$label = '';
			}

			$this->input->setValue( $label );
		}

		return $this->setLabelElementLabel( $label );
	}
586954
public function removeLabel(Label $label)
    {
        if ($this->labels->contains($label)) {
            $this->labels->removeElement($label);
        }
    }
125792
public function iSelectRadioButton( $label )
    {
        trigger_error(
            "iSelectRadioButton is deprecated since v6.3.0, use PlatformUI Context iSelectRadioButton instead",
            E_USER_DEPRECATED
        );
        $el = $this->getSession()->getPage()->findField( $label );
        Assertion::assertNotNull( $el, "Couldn't find a radio input with '$label'" );
        $el->check();
    }
225360
public void addReset(String label)
    {
        if (buttons==null)
            buttonsAtBottom();
        Element e = new Input(Input.Reset,"Reset",label);
        if (extendRow)
            addField(null,e);
        else
            buttons.add(e);
    }
285673
protected function addElement_checkbox ($name, $label, $customElementConfig=array())
    {
        $defaultElementConfig = array(
            'name'       => $name,
            'attributes' => array(
                'id'         => $name,
            ),
            'options'    => array(
                'label'      => $label,
            ),
        );
        $elementConfig = array_replace_recursive(
            $defaultElementConfig,
            $customElementConfig
        );

        $this->addElement_checkbox_configArray($elementConfig);
    }