Pleroma v1.1.9-10-g42f76306+dev Pleroma.Web.MastodonAPI.StatusView View Source

Link to this section Summary

Functions

Returns true whenever the list of templates changes in the filesystem.

The resource name, as an atom, for this view

Returns the template root alongside all templates.

Builds list emojis.

Builds a dictionary tags.

Renders the given template locally.

Same as render/3 but wrapped in a rescue block

Same as render_many/4 but wrapped in rescue block.

Callback invoked when no template is found. By default it raises but can be customized to render a particular template.

Link to this section Functions

Link to this function

__phoenix_recompile__?()

View Source

Returns true whenever the list of templates changes in the filesystem.

The resource name, as an atom, for this view

Returns the template root alongside all templates.

Link to this function

build_emojis(emojis)

View Source
build_emojis(nil | [tuple()]) :: [map()]

Builds list emojis.

Arguments: nil or list tuple of name and url.

Returns list emojis.

Examples

iex> Pleroma.Web.MastodonAPI.StatusView.build_emojis([{"2hu", "corndog.png"}]) [%{shortcode: "2hu", static_url: "corndog.png", url: "corndog.png", visible_in_picker: false}]

Link to this function

build_tags(object_tags)

View Source
build_tags([any()]) :: [map()]

Builds a dictionary tags.

Examples

iex> Pleroma.Web.MastodonAPI.StatusView.build_tags(["fediverse", "nextcloud"]) [{"name": "fediverse", "url": "/tag/fediverse"}, {"name": "nextcloud", "url": "/tag/nextcloud"}]

Link to this function

get_reply_to(activity, arg2)

View Source
Link to this function

render(template, assigns \\ %{})

View Source

Renders the given template locally.

Link to this function

safe_render(view, template, assigns \\ %{})

View Source

Same as render/3 but wrapped in a rescue block

Link to this function

safe_render_many(collection, view, template, assigns \\ %{})

View Source

Same as render_many/4 but wrapped in rescue block.

Link to this function

template_not_found(template, assigns)

View Source
template_not_found(Phoenix.Template.name(), map()) :: no_return()

Callback invoked when no template is found. By default it raises but can be customized to render a particular template.