Answers the label for the specified dimension.

@param string $dim

@return string
439197
public function getDimensionLabel($dim)
    {
        switch ($dim) {
            case self::DIM_WIDTH:
                return _t(__CLASS__ . '.WIDTH', 'Width');
            case self::DIM_HEIGHT:
                return _t(__CLASS__ . '.HEIGHT', 'Height');
        }
    }
270836
public function getDimensions($dim = "string") {
        if(!$this->getField('Filename')) {
            return null;
        }

        $imageDimensions = $this->getDimensionsFromDB($dim);
        if ($imageDimensions !== null) {
            return $imageDimensions;
        }

        // Download file from S3/CDN if we do not have dimensions stored in the DB
        $pointer = $this->obj('CDNFile');
        if($this->ID && $pointer->exists()) {
            $this->ensureLocalFile();
        }

        if (!$this->localFileExists()) {
            return null;
        }

        // Store in 'ImageDim' field and write if they've changed.
        $this->storeDimensions();
        if ($this->isChanged('ImageDim', \DataObject::CHANGE_VALUE)) {
            $this->write();
        }
        // Load dimensions
        return $this->getDimensionsFromDB($dim);
    }
1302098
public function label() {
		$output = null;
		if ( isset( $this->struct['label'] ) ) {
			$output .= '<label for="' . esc_attr( $this->id() ) . '-control"><span class="uix-control-label">' . esc_html( $this->struct['label'] ) . '</span></label>';
		}

		return $output;
	}
221411
protected function getLabel()
	{
		if (isset($this->labelOptions['class']))
			$this->labelOptions['class'] .= ' control-label';
		else
			$this->labelOptions['class'] = 'control-label';

		return parent::getLabel();
	}
67020
public function getLabel($text, $info = null)
    {
        $options = [
            'text' => $text,
            'templateVars' => []
        ];

        if ($info !== null) {
            $options['templateVars']['labelInfo'] = '<small>' . $info . '</small>';
        }

        return $options;
    }
486112
public function getLabel(array $context = null)
    {
        if ($this->getFamily()->hasAttribute('label')) {
            return $this->getValueData($this->getAttribute('label'), $context);
        }
        $label = null;
        try {
            $label = $this->getLabelValue($context);
        } catch (\Exception $e) {
        }
        if (null === $label && $this->getIdentifier()) {
            $label = "[{$this->getIdentifier()}]";
        }

        return $label;
    }
884104
public function getDimension($w, $h) {
        $labels = $this->getBiggestLabels(false);
        $pixelsAround = array(0, 0, 0, 0); // TRBL
        if (isset($labels[CINLabel::POSITION_TOP])) {
            $dimension = $labels[CINLabel::POSITION_TOP]->getDimension();
            $pixelsAround[0] += $dimension[1];
        }

        if (isset($labels[CINLabel::POSITION_RIGHT])) {
            $dimension = $labels[CINLabel::POSITION_RIGHT]->getDimension();
            $pixelsAround[1] += $dimension[0];
        }

        if (isset($labels[CINLabel::POSITION_BOTTOM])) {
            $dimension = $labels[CINLabel::POSITION_BOTTOM]->getDimension();
            $pixelsAround[2] += $dimension[1];
        }

        if (isset($labels[CINLabel::POSITION_LEFT])) {
            $dimension = $labels[CINLabel::POSITION_LEFT]->getDimension();
            $pixelsAround[3] += $dimension[0];
        }

        $finalW = ($w + $this->offsetX) * $this->scale;
        $finalH = ($h + $this->offsetY) * $this->scale;

        // This section will check if a top/bottom label is too big for its width and left/right too big for its height
        $reversedLabels = $this->getBiggestLabels(true);
        foreach ($reversedLabels as $label) {
            $dimension = $label->getDimension();
            $alignment = $label->getAlignment();
            if ($label->getPosition() === CINLabel::POSITION_LEFT || $label->getPosition() === CINLabel::POSITION_RIGHT) {
                if ($alignment === CINLabel::ALIGN_TOP) {
                    $pixelsAround[2] = max($pixelsAround[2], $dimension[1] - $finalH);
                } elseif ($alignment === CINLabel::ALIGN_CENTER) {
                    $temp = ceil(($dimension[1] - $finalH) / 2);
                    $pixelsAround[0] = max($pixelsAround[0], $temp);
                    $pixelsAround[2] = max($pixelsAround[2], $temp);
                } elseif ($alignment === CINLabel::ALIGN_BOTTOM) {
                    $pixelsAround[0] = max($pixelsAround[0], $dimension[1] - $finalH);
                }
            } else {
                if ($alignment === CINLabel::ALIGN_LEFT) {
                    $pixelsAround[1] = max($pixelsAround[1], $dimension[0] - $finalW);
                } elseif ($alignment === CINLabel::ALIGN_CENTER) {
                    $temp = ceil(($dimension[0] - $finalW) / 2);
                    $pixelsAround[1] = max($pixelsAround[1], $temp);
                    $pixelsAround[3] = max($pixelsAround[3], $temp);
                } elseif ($alignment === CINLabel::ALIGN_RIGHT) {
                    $pixelsAround[3] = max($pixelsAround[3], $dimension[0] - $finalW);
                }
            }
        }

        $this->pushLabel[0] = $pixelsAround[3];
        $this->pushLabel[1] = $pixelsAround[0];

        $finalW = ($w + $this->offsetX) * $this->scale + $pixelsAround[1] + $pixelsAround[3];
        $finalH = ($h + $this->offsetY) * $this->scale + $pixelsAround[0] + $pixelsAround[2];

        return array($finalW, $finalH);
    }
1372689
public function label($label=null){
		if($label){
			$this->label = $label;
		}else{
			return isset($this->label) ? $this->label : $this->name();
		}
	}
184527
public function label( string $name ) {
		return $this->$name ? get_field_object( $name, $this->_key )['label'] : FALSE;
	}
486464
public function getLabel()
    {
        if (!$this->entryFormatter) {
            $this->entryFormatter = Application::getFacadeApplication()->make(EntryFormatterInterface::class);
        }

        if ($mask = $this->getEntity()->getLabelMask()) {
            $name = $this->entryFormatter->format($mask, $this);
        }

        if (!$name) {
            $name = $this->entryFormatter->getLabel($this);
        }

        return $name;
    }
807481
public function RenderLabel () {
		if ($this->renderMode == \MvcCore\Ext\Forms\IForm::FIELD_RENDER_MODE_NO_LABEL) 
			return '';
		$attrsStr = $this->renderAttrsWithFieldVars(
			['multiple'], $this->groupLabelAttrs, $this->groupLabelCssClasses, FALSE
		);
		$viewClass = $this->form->GetViewClass();
		/** @var $templates \stdClass */
		$templates = & static::$templates;
		return $viewClass::Format($templates->label, [
			'id'		=> $this->id,
			'label'		=> $this->label,
			'attrs'		=> $attrsStr ? " $attrsStr" : '',
		]);
	}
470013
public function getIsActiveLabelAttribute()
    {
        $title = 'Not Active';
        $class = 'danger';

        $from = Carbon::parse($this->active_from);
        $to = Carbon::parse($this->active_to);

        if (!$this->active_to || Carbon::now()->diffInMinutes($to, false) > 0) {
            if (Carbon::now()->diffInMinutes($from, false) < 0) {
                $title = 'Active';
                $class = 'success';
            }
        }

        return "<span class='label label-{$class}'>{$title}</span>";
    }
1246247
public function labelTag($label=null, $for=null) {
		return '<label for="'.($for ? $for:$this->getID()).'">'.($label ? $label:$this->label()).'</label>';
	}
314287
public function getLabel() {
        $label = $this->label;
        if ($this->label === CINBarcode1D::AUTO_LABEL) {
            $label = '';
        }

        return $label;
    }
523751
public function getLabelData($index = null) {
		if($index === null)
			return $this->labelData;
		else
			return $this->labelData[$index];
	}
23957
def label(self):
        ""
        if self._label:
            return self._label
        else:
            if len(self):
                label = get_ndmapping_label(self, 'label')
                return '' if label is None else label
            else:
                return ''
301651
public static function getSize( $size )
    {
        $dim = [];
        if( is_array( $size ) )
        {
            $dim[ 'w' ] = $size[0];
            $dim[ 'h' ] = isset( $size[1] ) ? $size[1] : $size[0];
        }
        else
        {
            $dim[ 'w' ] = $size;
            $dim[ 'h' ] = null;
        }

        return $dim;
    }