Retrieve the object's labels.

@return array|null
325077
public function objLabels()
    {
        if ($this->objLabels === null) {
            $objLabels = [];
            $proto = $this->proto();
            $objMetadata = $proto->metadata();
            if (isset($objMetadata['labels']) && !empty($objMetadata['labels'])) {
                $objLabels = $objMetadata['labels'];
                array_walk($objLabels, function(&$value) {
                    $value = $this->translator()->translation($value);
                });
                $this->objLabels = $objLabels;
            }
        }

        return $this->objLabels;
    }
407965
private function getBiggestLabels($reversed = false) {
        $searchLR = $reversed ? 1 : 0;
        $searchTB = $reversed ? 0 : 1;

        $labels = array();
        foreach ($this->labels as $label) {
            $position = $label->getPosition();
            if (isset($labels[$position])) {
                $savedDimension = $labels[$position]->getDimension();
                $dimension = $label->getDimension();
                if ($position === CINLabel::POSITION_LEFT || $position === CINLabel::POSITION_RIGHT) {
                    if ($dimension[$searchLR] > $savedDimension[$searchLR]) {
                        $labels[$position] = $label;
                    }
                } else {
                    if ($dimension[$searchTB] > $savedDimension[$searchTB]) {
                        $labels[$position] = $label;
                    }
                }
            } else {
                $labels[$position] = $label;
            }
        }

        return $labels;
    }
679309
protected function getDropdownLabels()
    {
        if ($source = array_get($this->field->options(), 'label_source')) {

            $labels = $this->getDropdownLabelsFromSource($source);

            if (false !== $labels) {
                return $labels;
            }
        }

        $labels = array_get($this->field->options(), 'labels_translated', []);

        if (count($labels)) {
            return array_map('cms_trans', $labels);
        }

        return array_get($this->field->options(), 'labels', []);
    }
91007
public function createLabels()
    {
        // default labels
        $labels = [
            'name' => $this->plural,
            'singular_name' => $this->singular,
            'menu_name' => $this->plural,
            'all_items' => $this->plural,
            'add_new' => "Add New",
            'add_new_item' => "Add New {$this->singular}",
            'edit_item' => "Edit {$this->singular}",
            'new_item' => "New {$this->singular}",
            'view_item' => "View {$this->singular}",
            'search_items' => "Search {$this->plural}",
            'not_found' => "No {$this->plural} found",
            'not_found_in_trash' => "No {$this->plural} found in Trash",
            'parent_item_colon' => "Parent {$this->singular}:",
        ];

        return array_replace_recursive($labels, $this->labels);
    }
1044873
public function getLabels()
    {
        $result = [];

        $labels = (isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] : [];

        foreach ($labels as $index) {
            $result[] = $this->getChild($index);
        }

        return $result;
    }
103034
public static function getAllLabels()
    {
        // Load Plugin translations
        $labels = [];
        foreach(self::activePlugins() as $plugin){
            if(File::isDirectory($plugin->translationsPath().'/'.App::getLocale())) {
                $translationFiles = File::files($plugin->translationsPath() . '/' . App::getLocale());
                foreach ($translationFiles as $file) {
                    $fileName = str_replace('.php', '', $file->getFilename());

                    $pluginNamespace = explode(".", $plugin->namespaceWithDot());

                    // set a array key for each plugin author
                    if(!isset($labels[$pluginNamespace[0]])) {
                        $labels[$pluginNamespace[0]] = [];
                    }
                    // set a array key for each plugin
                    if(!isset($labels[$pluginNamespace[0]][$pluginNamespace[1]])) {
                        $labels[$pluginNamespace[0]][$pluginNamespace[1]] = [];
                    }

                    $labels[$pluginNamespace[0]][$pluginNamespace[1]][$fileName] = File::getRequire($file->getPathName());
                }
            }
        }

        return $labels;
    }
1154897
public function labels($labels = null)
    {
        if ($labels === null)
        {
            return $this->_labels;
        }

        $this->_labels = $labels;
        return $this;
    }
885668
public function getLabelAttributes()
    {
        $result = [];
        $label = $this->element->getLabel();
        foreach ($label->getAttributes() as $attribute => $value) {
            if (null === $value) {
                $result[] = $attribute;
                continue;
            }

            $result[] = "{$attribute}=\"{$value}\"";
        }
        return implode(' ', $result);
    }
1091612
public function toArray()
    {
        return [
            'name'     => $this->getName(),
            'label'    => $this->getLabel(),
            'width'    => $this->getWidth(),
            'fixed'    => $this->isFixed(),
            'minWidth' => $this->getMinWidth(),
            'sortable' => $this->getSortable(),
            'type'     => $this->getType(),
        ];
    }
139652
public function getLabel()
    {
        if (property_exists($this, '_label_column')) {
            if (property_exists($this, $this->_label_column)) {
                $label_column = $this->_label_column;
                return $this->$label_column;
            }
        }
        if (property_exists($this, 'name')) {
            return $this->name;
        }
        if (property_exists($this, 'description')) {
            return $this->description;
        }
        return "No label for " . get_called_class() . " ID " . $this->getId();
    }
330690
public function get_collectionlabel() {
        if (!empty($this->collectionlabel)) {
            return $this->collectionlabel;
        }
        if ($this->parent && ($this->parent instanceof flat_navigation_node || $this->parent instanceof flat_navigation)) {
            return $this->parent->get_collectionlabel();
        }
        debugging('Navigation region requires a label', DEBUG_DEVELOPER);
        return '';
    }
1293334
public function getCurrentContainerLabel()
    {
        if ($this->getContainerCode() !== null) {
            $container = $this->containersSource->get($this->getContainerCode());

            if ($this->getContainerLabel($container)) {
                return $this->getContainerLabel($container);
            }
        }
    }
822352
function getLabel()
    {
        if ($this->filtername)
            return $this->filtername;

        $className = explode('\\', get_class($this));
        $className = $className[count($className)-1];

        return $className.'.*';
    }
1186174
public function getRawData()
    {
        return [
            'ord' => $this->ord,
            'viewname' => $this->viewname,
            'label_en' => $this->labels['en'],
            'label_fr' => $this->labels['fr'],
            'label_de' => $this->labels['de'],
            'label_nl' => $this->labels['nl'],
        ];
    }
549541
protected function getLabel(): string
    {
        if ($this->label != null) {
            return $this->label;
        }

        if (isset($this->model->attributeLabels()[$this->name])) {
            return $this->model->attributeLabels()[$this->name];
        }

        return ucfirst($this->name);
    }
974046
public function getLabel() : ?string 
    {
        if ( ! $this->hasLabel()) {
            $this->setLabel($this->getDefaultLabel());
        }
        return $this->label;
    }
769817
public function attributeLabels()
    {
        $attributeLabels = parent::attributeLabels();
        $attributeLabels['id'] = Yii::t('user', 'User ID');
        $attributeLabels['nickname'] = Yii::t('user', 'Nickname');
        $attributeLabels['first_name'] = Yii::t('user', 'First Name');
        $attributeLabels['last_name'] = Yii::t('user', 'Last Name');
        $attributeLabels['gf'] = Yii::t('user', 'Gender');
        $attributeLabels['createdFrom'] = Yii::t('user', 'From');
        $attributeLabels['createdTo'] = Yii::t('user', 'To');
        return $attributeLabels;
    }