Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev Guide
Dev GuideUser GuidesGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

ChannelContentResult

OCP App SDK


OCP App SDK / ChannelContentResult

Class: ChannelContentResult

Defined in: src/app/lib/ChannelContentResult.ts:14

Result of Channel.validate and Channel.publish.

Extends

Constructors

Constructor

new ChannelContentResult(): ChannelContentResult

Returns

ChannelContentResult

Inherited from

FormResult.constructor

Properties

errors

protected errors: object = {}

Defined in: src/app/lib/FormResult.ts:4

Index Signature

[field: string]: string[]

Inherited from

FormResult.errors


toasts

protected toasts: object[] = []

Defined in: src/app/lib/FormResult.ts:5

intent

intent: Intent

message

message: string

Inherited from

FormResult.toasts

Methods

addError()

addError(form, section, field, error): this

Defined in: src/app/lib/ChannelContentResult.ts:22

Add an error to display to the user for a particular form field.

Parameters

form

the type of content form that the error applies to (settings or template)

"settings" | "template"

section

string

the section within the form that the error applies to

field

string

the field within the section that the error applies to

error

string

message to display to the user

Returns

this


addToast()

addToast(intent, message): this

Defined in: src/app/lib/FormResult.ts:13

Display a toast to user, such as, "Successfully authenticated with " or
"Authentication failed, please check your credentials and try again."

Parameters

intent

Intent

one of the supported intents that will affect how the toast is displayed

message

string

to display in the toast

Returns

this

Inherited from

FormResult.addToast