Returns the button label

@param $value

@return string
167273
private function getButtonLabel($value)
    {
        return $value === null ? $this->emptyButtonLabel : ($value ? $this->checkedButtonLabel : $this->uncheckedButtonLabel);
    }
994052
public function get_label($data) {
        $operators = $this->get_operators();
        $operator  = $data['operator'];
        $value     = $data['value'];

        if (empty($operator)) {
            return '';
        }

        $a = new stdClass();
        $a->label    = $this->_label;
        $a->value    = '"'.s($this->_options[$value]).'"';
        $a->operator = $operators[$operator];

        return get_string('selectlabel', 'filters', $a);
    }
1222663
public function compile($value = "")
	{
		$html = $this->compiledLabel;

		if (!empty($this->help)) {
			$html .= "<div class='help'>{$this->help}</div>";
		}

		$html .= "<input type=\"{$this->type}\" name=\"{$this->name}\" {$this->compiledAttr} value=\"{$value}\" />";

		return $html;
	}
243529
protected function getTranslatedLabel($value, $label)
    {
        $translationConfiguration = $this->arguments['translate'];

        $translateBy = isset($translationConfiguration['by']) ? $translationConfiguration['by'] : 'id';
        $sourceName = isset($translationConfiguration['source']) ? $translationConfiguration['source'] : 'Main';
        $request = $this->controllerContext->getRequest();
        $packageKey = null;
        if (isset($translationConfiguration['package'])) {
            $packageKey = $translationConfiguration['package'];
        } elseif ($request instanceof ActionRequest) {
            $packageKey = $request->getControllerPackageKey();
        }
        $prefix = isset($translationConfiguration['prefix']) ? $translationConfiguration['prefix'] : '';

        if (isset($translationConfiguration['locale'])) {
            try {
                $localeObject = new Locale($translationConfiguration['locale']);
            } catch (InvalidLocaleIdentifierException $e) {
                throw new ViewHelper\Exception('"' . $translationConfiguration['locale'] . '" is not a valid locale identifier.', 1330013193);
            }
        } else {
            $localeObject = null;
        }

        switch ($translateBy) {
            case 'label':
                $label =  isset($translationConfiguration['using']) && $translationConfiguration['using'] === 'value' ? $value : $label;
                return $this->translator->translateByOriginalLabel($label, array(), null, $localeObject, $sourceName, $packageKey);
            case 'id':
                $id =  $prefix . (isset($translationConfiguration['using']) && $translationConfiguration['using'] === 'label' ? $label : $value);
                $translation = $this->translator->translateById($id, array(), null, $localeObject, $sourceName, $packageKey);
                return ($translation !== null) ? $translation : $label;
            default:
                throw new ViewHelper\Exception('You can only request to translate by "label" or by "id", but asked for "' . $translateBy . '" in your SelectViewHelper tag.', 1340050647);
        }
    }
974046
public function getLabel() : ?string 
    {
        if ( ! $this->hasLabel()) {
            $this->setLabel($this->getDefaultLabel());
        }
        return $this->label;
    }
217174
protected function getLabel($key, $value)
    {
        
        if ($this->labelsCache === null) { 
            $this->prepareCacheLabels();
        }
        
        return $this->labelsCache[$key]($value);
    }
84754
static function button($name,$value='',$attrArray=null)
	{
		if(empty($attrArray['type'])) $attrArray['type'] = 'button';
	    $attrStr = self::input_attr($attrArray);
		return "<input name='{$name}' id='{$name}' value='{$value}' {$attrStr} />";
	}
596428
public function getLabel()
	{
		$label = null;
		$id = $this->getAttribute('id');

		if ( !is_null($id) ) {
			// Label with matching "for" attribute.
			$escaped_id = $this->getXpathEscaper()->escapeLiteral($id);
			$xpath_expressions = array(
				'preceding::label[@for = ' . $escaped_id . ']',
				'following::label[@for = ' . $escaped_id . ']',
			);
			$label = $this->getWrappedElement()->find('xpath', '(' . implode(' | ', $xpath_expressions) . ')[1]');
		}

		if ( is_null($label) ) {
			// Label wrapped around checkbox.
			$label = $this->getWrappedElement()->find('xpath', 'parent::label');
		}

		if ( is_null($label) ) {
			// Label right next to checkbox.
			$label = $this->getWrappedElement()->find('xpath', 'following-sibling::*[1][self::label]');
		}

		return $label;
	}
1132327
public static function getStringRepresentation($value)
    {
        if (is_scalar($value) || $value === null) {
            $stringRepresentation = is_string($value) && !mb_check_encoding($value, 'UTF-8')
                ? 'non UTF-8 string'
                : var_export($value, true);
        } elseif (is_array($value)) {
            $stringRepresentation = 'array';
        } elseif (is_resource($value)) {
            $stringRepresentation = 'resource of type (' . get_resource_type($value) . ')';
        } else {
            $stringRepresentation = 'instance of ' . get_class($value);
        }
        return $stringRepresentation;
    }
800422
private function getLabelFor($property)
    {
        switch ($property) {

            case 'nid':
                return t("Node ID.");

            case 'vid':
                return t("Revision ID.");

            case 'type':
                return t("Type");

            case 'language':
                return t("Language");

            case 'label':
                return t("Label");

            case 'title':
                return t("Title");

            case 'uid':
                return t("User ID.");

            case 'status':
                return t("Status");

            case 'changed':
                return t("Latest update at");

            case 'created':
                return t("Created at");

            case 'promote':
                return t("Promoted");

            case 'sticky':
                return t("Sticked");

            case 'name':
                return t("Name");

            case 'pass':
                return t("Password");

            case 'mail':
                return t("E-mail");

            case 'theme':
                return t("Theme");

            case 'signature':
                return t("Signature");

            case 'signature_format':
                return t("Signature format");

            case 'access':
                return t("Lastest access at");

            case 'login':
                return t("Lastest login at");

            case 'timezone':
                return t("Timezone");

            case 'description':
                return t("Description");

            case 'format':
                return t("Format");
        }

        return $property;
    }
525781
public static function arg($value): string
    {
        switch (gettype($value)) {
            case 'NULL':
                return 'NULL';
            case 'boolean':
                return $value ? 'true' : 'false';
            case 'array':
                return 'Array';
            case 'object':
                return 'Object('.get_class($value).')';
            case 'string':
                return "'".self::cutString((string)$value)."'";
            default:
                return (string)$value;
        }
    }
645387
public function button($value = null, $options = [])
    {
        if (! array_key_exists('type', $options)) {
            $options['type'] = 'button';
        }

        return '<button'.$this->html->attributes($options).'>'.$value.'</button>';
    }
1155510
def _get_button_label(self):
        """"""

        dlg = wx.TextEntryDialog(self, _('Button label:'))

        if dlg.ShowModal() == wx.ID_OK:
            label = dlg.GetValue()
        else:
            label = ""

        dlg.Destroy()

        return label
480250
public function displayValue($value): string
    {
        if ($value === null) {
            return 'NULL';
        }

        if ($value === true) {
            return 'TRUE';
        }

        if ($value === false) {
            return 'FALSE';
        }

        if (is_array($value)) {
            return Json::encode($value);
        }

        return '"' . str_replace('"', '\"', $value) . '"';
    }
942828
private function getValue($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        if ($value[0] != '%' || $value[strlen($value) - 1] != '%')  {
            return $value;
        }

        $parameter = trim($value, '%');
        if ($this->container->hasParameter($parameter)) {
            return $this->container->getParameter($parameter);
        }

        return $value;
    }
1077159
public function fieldLabelFilter($value, $objectName, $fieldName)
    {
        $fieldConfiguration = $this->flexModel->getField($objectName, $fieldName);

        $label = "";
        if (is_array($fieldConfiguration)) {
            $label = $fieldConfiguration['label'];
        }

        return $label;
    }
76066
public function label($name, $value = null, array $options = [])
    {
        $options = $this->getLabelOptions($options);

        $escapeHtml = false;

        if (is_array($value) and isset($value['html'])) {
            $value = $value['html'];
        } elseif ($value instanceof HtmlString) {
            $value = $value->toHtml();
        } else {
            $escapeHtml = true;
        }

        return $this->form->label($name, $value, $options, $escapeHtml);
    }