A reference to an entity used in generated <a> elements.

It is used to refer to some specific entities when generating links. If null is returned, then no link are generated and <a> elements become <span>.

By default, null is returned. Clients are therefore encouraged to redefine the method in a subclass to control where entities should link to.

Property definitions

nitc $ HtmlightVisitor :: hrefto
	# A reference to an entity used in generated `<a>` elements.
	#
	# It is used to refer to some specific entities when generating links.
	# If `null` is returned, then no link are generated and `<a>` elements become `<span>`.
	#
	# By default, `null` is returned.
	# Clients are therefore encouraged to redefine the method in a subclass to control where entities should link to.
	fun hrefto(entity: MEntity): nullable String do return null
src/htmlight.nit:103,2--110,60

nitc :: static_html $ HtmlightVisitor :: hrefto
	redef fun hrefto(mentity) do return mentity.html_url
src/doc/static/static_html.nit:202,2--53

nitc :: api_base $ HtmlightVisitor :: hrefto
	redef fun hrefto(mentity) do return mentity.html_url
src/doc/api/api_base.nit:230,2--53

nitc $ CmdHtmlightVisitor :: hrefto
	redef fun hrefto(mentity) do
		if mentity isa MClassDef then return mentity.mclass.html_url
		if mentity isa MPropDef then return mentity.mproperty.html_url
		return mentity.html_url
	end
src/doc/templates/html_commands.nit:157,2--161,4

nitc $ NitlightVisitor :: hrefto
	redef fun hrefto(entity) do return entity.href(self)
src/nitlight.nit:35,2--53

nitc $ TestHighlightVisitor :: hrefto
	redef fun hrefto(e) do
		return "#" + e.c_name
	end
src/test_highlight.nit:23,2--25,4