Pagination "Last" link

@param	string $value optional text to display in the link

@return	string	Markup for the 'last' page number link
4176
public function last($marker = null)
	{
		$html = '';

		$marker === null and $marker = $this->template['last-marker'];

		if ($this->config['show_last'])
		{
			if ($this->config['total_pages'] > 1 and $this->config['calculated_page'] != $this->config['total_pages'])
			{
				$html = str_replace(
					'{link}',
					str_replace(array('{uri}', '{page}'), array($this->_make_link($this->config['total_pages']), $marker), $this->template['last-link']),
					$this->template['last']
				);
				$this->raw_results['last'] = array('uri' => $this->_make_link($this->config['total_pages']), 'title' => $marker, 'type' => 'last');
			}
			else
			{
				$html = str_replace(
					'{link}',
					str_replace(array('{uri}', '{page}'), array('#', $marker), $this->template['last-inactive-link']),
					$this->template['last-inactive']
				);
				$this->raw_results['last'] = array('uri' => '#', 'title' => $marker, 'type' => 'last-inactive');
			}
		}

		return $html;
	}
943738
public function displayValue( $value )
    {
        if ( $this->getUseRegularExpression() )
        {
            return preg_replace( $this->getFrom(), $this->getTo(), $value );
        }
        else
        {
            return str_replace( $this->getFrom(), $this->getTo(), $value );
        }
    }
202297
public function transform($value)
    {
        if (null === $value || !($value instanceof Collection)) {
            return '';
        }

        $string = '';
        foreach ($value as $item) {
            $string .= $item->getId();

            if ($value->last() != $item) {
                $string .= ',';
            }
        }

        return $string;
    }
1309439
public static String last(final String value, int n) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (n > value.length()) {
            return value;
        }
        return value.substring(value.length() - n);
    }
1151173
public static function endsWith($value, $end)
    {
        if (is_array($value)) {
            return self::last($value) == $end;
        }

        $end = "$end";

        return substr($value, -strlen($end)) === $end;
    }
488718
protected function cleanupParam($value)
    {
        if (is_array($value)) {
            foreach ($value as $k => $v) {
                $clean = $this->cleanupParam($v);
                if (!is_null($clean)) {
                    $value[$k] = $clean;
                }
            }

            return $value;
        } else {
            return preg_replace('/>/', '', preg_replace('/</', '', $value));
        }
    }
582982
function render_last($anchor=true)
	{
	global $PHP_SELF;

		if (!$this->db->pageExecuteCountRows) return;

		if ($anchor) {
		?>
			<a href="<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->LastPageNo() ?>"><?php echo $this->last;?></a> &nbsp;
		<?php
		} else {
			print "$this->last &nbsp; ";
		}
	}
678981
public function selectLink($value)
    {
        $xpath = sprintf('descendant-or-self::a[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) ', static::xpathLiteral(' '.$value.' ')).
                            sprintf('or ./img[contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)]]', static::xpathLiteral(' '.$value.' '));

        return $this->filterRelativeXPath($xpath);
    }
528470
protected function clean_url($value) {
        global $CFG;

        if (empty($value)) {
            // Nothing.

        } else if (strpos($value, $CFG->wwwroot . '/') === 0) {
            $value = str_replace($CFG->wwwroot, '', $value);

        } else if (strpos($value, '/') !== 0) {
            debugging("Invalid url_select urls parameter: url '$value' is not local relative url!", DEBUG_DEVELOPER);
        }

        return $value;
    }
1233788
public function setReturnUrlTarget($value)
    {
        switch ($value) {
            case '_top':
                $value = 1;
                break;

            case '_parent':
                $value = 2;
                break;

            case '_self':
                $value = 3;
                break;

            case '_blank':
                $value = 4;
                break;

            default:
                $value = (int)$value;
        }

        return $this->setParameter('returnUrlTarget', $value);
    }
1000060
public function getLastPageParams()
    {
        $limit = $this->limit <= 0 ? $this->count : $this->limit;
        $last_page = intdiv(intval($this->count), intval($limit));
        $last_url = $this->offset_key
            . ($last_page * $limit)
            . $this->limit_key
            . $limit;

        return $last_url;
    }
916623
public function formatUrl($value)
	{
		$url=$value;
		if(strpos($url,'http://')!==0 && strpos($url,'https://')!==0)
			$url='http://'.$url;
		return CHtml::link(CHtml::encode($value),$url);
	}
22523
protected function link($value, array $options)
    {
        $return = is_string($value) ? $value : (is_array($value) ? implode(',', $value) : $value);

        if ($options['link']) {
            return sprintf('<a href="%s">%s</a>', $options['link'], $return);
        }

        if ($options['route']) {
            $url = $this->generator->generate($options['route'], $options['parameters'] ?? []);

            return sprintf('<a href="%s">%s</a>', $url, $return);
        }

        return $return;
    }
1169413
private function sregValue($value = '')
    {
        $owner = $this->owner;
        $values = explode('|', $value);
        $count = count($values);
        foreach ($values as $key => $fieldPath) {
            if ($fieldPath == '' || $fieldPath == 'null') {
                return null;
            } elseif ($relValue = $this->sregTraverse($fieldPath)) {
                if (is_object($relValue) && method_exists($relValue, 'AbsoluteLink')) {
                    if ($link = $relValue->AbsoluteLink()) {
                        return $link;
                    } else {
                        continue;
                    }
                } else {
                    return $relValue;
                }
            } elseif ($key + 1 == $count && !$owner->hasMethod($fieldPath) ) {
                return $fieldPath;
            }
        }
    }
285197
public function LastLink()
    {
        return HTTP::setGetVar(
            $this->getPaginationGetVar(),
            ($this->TotalPages() - 1) * $this->getPageLength(),
            ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null
        );
    }
1316593
public static function isUrl($value)
    {
        return \Myaf\Validator\Rules\UrlValidator::validate('', $value, [], self::getInstance());
    }
424245
static public function urlencode($value)
    {
        if (is_string($value)) {
            return urlencode($value);
        } elseif (is_array($value)) {
            foreach ($value as $k => $v) {
                $value[$k] = static::urlencode($v);
            }
        }
        return $value;
    }