Copied!
CloneableInstantiable
Methods
public Maknz\Slack\Payload::__construct(array $attributes)
 

Instantiate a new payload.

  • param array $attributes
public static Maknz\Slack\BlockElement::factory( $attributes)
 

Create a Block element from a keyed array of attributes.

  • param mixed $attributes
  • return \BlockElement
  • throws \InvalidArgumentException
public getActionId()
 

Get the action.

  • return string
public getDispatchConfig()
 

Get the input dispatch config.

  • return string[]
public getInitialValue()
 

Get the initial value.

  • return string
public getMaxLength()
 

Get the input maximum length.

  • return int
public getMinLength()
 

Get the input minimum length.

  • return int
public getMultiline()
 

Get whether the input spans multiple lines.

  • return bool
public getPlaceholder()
 

Get the placeholder.

  • return \Maknz\Slack\BlockElement\Text
public Maknz\Slack\BlockElement::getType()
 

Get the block type.

  • return string
public Maknz\Slack\BlockElement::isValidFor(Maknz\Slack\Block $block)
 

Check if an element is valid for a Block.

  • param \Block $block
  • return bool
public setActionId( $actionId)
 

Set the action.

  • param string $actionId
  • return $this
public setDispatchConfig(array $dispatchConfig)
 

Set the input dispatch config.

  • param string[] $dispatchConfig
  • return $this
  • throws \InvalidArgumentException
public setInitialValue( $initialValue)
 

Set the initial value.

  • param string $initialValue
  • return $this
public setMaxLength( $maxLength)
 

Set the input maximum length.

  • param int $maxLength
  • return $this
public setMinLength( $minLength)
 

Set the input minimum length.

  • param int $minLength
  • return $this
public setMultiline( $multiline)
 

Set whether the input spans multiple lines.

  • param bool $multiline
  • return $this
public setPlaceholder( $placeholder)
 

Set the placeholder.

  • param mixed $placeholder
  • return $this
  • throws \InvalidArgumentException
public toArray()
 

Convert the block to its array representation.

  • return array
Properties
protected $action_id = NULL
 

Input action.

  • var string
protected static $availableAttributes = ['action_id' => 'action_id', 'placeholder' => 'placeholder', 'initial_value' => 'initial_value', 'multiline' => 'multiline', 'min_length' => 'min_length', 'max_length' => 'max_length', 'dispatch_action_config' => 'dispatch_config']
 

Internal attribute to property map.

  • var array
protected $dispatch_config = NULL
 

When the element should return its payload.

  • var string[]
protected $initial_value = NULL
 

Input initial value.

  • var string
protected $max_length = NULL
 

Maximum length of the input.

  • var int
protected $min_length = NULL
 

Minimum length of the input.

  • var int
protected $multiline = false
 

Whether the input spans multiple lines.

  • var bool
protected $placeholder = NULL
 

Select placeholder.

  • var \Maknz\Slack\BlockElement\Text
protected $type = 'plain_text_input'
 

Block type.

  • var string
protected static Maknz\Slack\BlockElement::$validFor = ['button' => ['Button', ['section', 'actions']], 'checkboxes' => ['Checkboxes', ['section', 'actions', 'input']], 'datepicker' => ['DatePicker', ['section', 'actions', 'input']], 'timepicker' => ['Timepicker', ['section', 'actions', 'input']], 'image' => ['Image', ['section', 'context']], 'multi_static_select' => ['MultiStaticSelect', ['section', 'input']], 'multi_external_select' => ['MultiExternalSelect', ['section', 'input']], 'multi_users_select' => ['MultiUsersSelect', ['section', 'input']], 'multi_conversations_select' => ['MultiConversationsSelect', ['section', 'input']], 'multi_channels_select' => ['MultiChannelsSelect', ['section', 'input']], 'overflow' => ['Overflow', ['section', 'actions']], 'plain_text_input' => ['TextInput', ['input']], 'radio_buttons' => ['RadioButtons', ['section', 'actions', 'input']], 'static_select' => ['StaticSelect', ['section', 'actions', 'input']], 'external_select' => ['ExternalSelect', ['section', 'actions', 'input']], 'users_select' => ['UsersSelect', ['section', 'actions', 'input']], 'conversations_select' => ['ConversationsSelect', ['section', 'actions', 'input']], 'channels_select' => ['ChannelsSelect', ['section', 'actions', 'input']], 'plain_text' => ['Text', ['context']], 'mrkdwn' => ['Text', ['context']]]
 

List of blocks each element is valid for.

  • var array
Methods
protected Maknz\Slack\Payload::fillProperties(array $attributes) : self
 
  • param array $attributes
  • return $this
Properties
protected static $availableAttributes = ['action_id' => 'action_id', 'placeholder' => 'placeholder', 'initial_value' => 'initial_value', 'multiline' => 'multiline', 'min_length' => 'min_length', 'max_length' => 'max_length', 'dispatch_action_config' => 'dispatch_config']
 

Internal attribute to property map.

  • var array
protected static Maknz\Slack\BlockElement::$validFor = ['button' => ['Button', ['section', 'actions']], 'checkboxes' => ['Checkboxes', ['section', 'actions', 'input']], 'datepicker' => ['DatePicker', ['section', 'actions', 'input']], 'timepicker' => ['Timepicker', ['section', 'actions', 'input']], 'image' => ['Image', ['section', 'context']], 'multi_static_select' => ['MultiStaticSelect', ['section', 'input']], 'multi_external_select' => ['MultiExternalSelect', ['section', 'input']], 'multi_users_select' => ['MultiUsersSelect', ['section', 'input']], 'multi_conversations_select' => ['MultiConversationsSelect', ['section', 'input']], 'multi_channels_select' => ['MultiChannelsSelect', ['section', 'input']], 'overflow' => ['Overflow', ['section', 'actions']], 'plain_text_input' => ['TextInput', ['input']], 'radio_buttons' => ['RadioButtons', ['section', 'actions', 'input']], 'static_select' => ['StaticSelect', ['section', 'actions', 'input']], 'external_select' => ['ExternalSelect', ['section', 'actions', 'input']], 'users_select' => ['UsersSelect', ['section', 'actions', 'input']], 'conversations_select' => ['ConversationsSelect', ['section', 'actions', 'input']], 'channels_select' => ['ChannelsSelect', ['section', 'actions', 'input']], 'plain_text' => ['Text', ['context']], 'mrkdwn' => ['Text', ['context']]]
 

List of blocks each element is valid for.

  • var array
Methods
public static Maknz\Slack\BlockElement::factory( $attributes)
 

Create a Block element from a keyed array of attributes.

  • param mixed $attributes
  • return \BlockElement
  • throws \InvalidArgumentException
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration