Gets title to display from a given label.

@param CrestApps\CodeGenerator\Models\Label $label
@param bool $raw

@return $this
172808
protected function getTitle(Label $label, $raw = false)
    {
        if (!$label->isPlain) {
            return $this->getTranslatedTitle($label, $raw);
        }

        return $this->getPlainTitle($label, $raw);
    }
1124695
public static function label(string $label): self
    {
        $item = new self();

        $item->label = $label;
        $item->slug = Str::slug($label);

        return $item;
    }
7371
private function cleanOriginalLabel($label)
    {
        $label = str_replace(LabelFilter::SEPARATOR_RECURSIVE_LABEL, ' - ', $label);
        $label = SafeDecodeLabel::decodeLabelSafe($label);
        return $label;
    }
211328
public static function label(
        string $label, 
        string $for, 
        array $attributes = []
    ) : string
    {
        $preAttributesLabel = [
            "for" => $for,
        ];
        $attributesLabel = array_merge($preAttributesLabel, $attributes);
        return self::tag("label", $label, $attributesLabel);
    }
1154897
public function labels($labels = null)
    {
        if ($labels === null)
        {
            return $this->_labels;
        }

        $this->_labels = $labels;
        return $this;
    }
1297442
public function setLabels(array $labels = ['k' => 'v'])
    {
        $this->labels = $labels;

        $this->raw = array_merge($this->raw, ['Labels' => $labels]);

        return $this;
    }
1044011
private function get_add_element_content($label) {
        global $PAGE, $OUTPUT;

        $bs4 = false;

        $theme = $PAGE->theme;
        if ($theme->name === 'boost') {
            $bs4 = true;
        } else {
            foreach ($theme->parents as $basetheme) {
                if ($basetheme === 'boost') {
                    $bs4 = true;
                }
            }
        }

        if (!$bs4) {
            return $label;
        }
        return $OUTPUT->pix_icon('e/insert', $label);
    }
1169891
def title(label, style=None):
    
    fig = current_figure()
    fig.title = label
    if style is not None:
        fig.title_style = style
1032796
public function setLabelOne($labels, $one)
    {
        $labels->singular_name = __($one);
        $labels->add_new = __('Add ' . $one);
        $labels->add_new_item = __('Add New ' . $one);
        $labels->edit_item = __('Edit ' . $one);
        $labels->new_item = __('New ' . $one);
        $labels->view_item = __('View ' . $one);
        $labels->parent_item_colon = __('Parent ' . $one . ':');
        $labels->archives = __($one . ' Archives');
        $labels->attributes = __($one . ' Attributes');
        $labels->insert_into_item = __('Insert into ' . strtolower($one));
        $labels->uploaded_to_this_item = __('Uploaded to this ' . strtolower($one));
        $labels->filter_items_list = __('Filter ' . strtolower($one) . ' list ');
        $labels->name_admin_bar = __($one);
        return $labels;
    }
495571
protected Label buildTitleLabel() {
        // create default title - even shown when no data is available
        title = new LabelBuilder().name(titleText).buildCaptionLabel();
        title.setImmediate(true);
        title.setContentMode(ContentMode.HTML);

        return title;
    }
700071
public function key($name, $label = null)
    {
        $this->lastKey = $name;

        // Rest previous key's last rule
        $this->lastRule = null;

        if (!isset($this->options['rules'][$name])) {
            $this->options['rules'][$name] = [];
        }

        if (isset($label)) {
            $this->label($label);
        }

        return $this;
    }
1140532
public function setLabel($controller, $action, $label)
    {
        $key = $this->_getKey($controller, $action);

        $this->altLabels[$key] = $label;

        return $this;
    }
1051707
public function getLabel(\core_kernel_classes_Resource $delivery, $label = '')
    {
        $user = \common_session_SessionManager::getSession()->getUser();
        $customLabelRoles = $this->getOption(self::PROPERTY_CUSTOM_LABEL);
        if (array_intersect($customLabelRoles, $user->getRoles())) {
            $property = $this->getProperty(self::PROPERTY_CUSTOM_LABEL);
            if ((string)$delivery->getOnePropertyValue($property)) {
                $label = $delivery->getOnePropertyValue($property);
            }
        }
        return (string) $label;
    }
584154
public function addLabel($label, $before=false, $icon=NULL) {
		$labelO=$label;
		if (\is_object($label) === false) {
			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
			if (isset($icon))
				$labelO->addIcon($icon);
		} else {
			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
		}
		$this->addContent($labelO, $before);
		return $labelO;
	}
613350
public function setLabel($label) : self
    {
        if (!$label instanceof Label && !$label instanceof HtmlElement) {
            $label = new Label($label);
        }

        $this->label = $label;

        if (!$this->field->getId() && $this->label instanceof Label) {
            $this->label->setFor($this->field->generateId()->getId());
        }

        if (!$this->getPlaceholder() && $this->label->getContent()) {
            $this->setPlaceholder($this->label->getContent());
        }

        return $this;
    }
1267338
protected function getOrCreateTag($label)
    {
        if (isset($this->tagFirstLevelCache[$label])) {
            return $this->tagFirstLevelCache[$label];
        }

        $tag = $this->tagRepository->findOneByLabel($label);

        if ($tag === null) {
            $tag = new Tag($label);
            $this->tagRepository->add($tag);
        }

        $this->tagFirstLevelCache[$label] = $tag;

        return $tag;
    }
42554
public function createGroup($label)
    {
        $group = new Select\Group();
        $group->textContent->push($label);

        $this->childNodes->push($group);

        return $this->childNodes->last();
    }