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

Instantiate a new payload.

  • param array $attributes
public addOption( $option)
 

Add an option to the block.

  • param mixed $option
  • return $this
  • throws \InvalidArgumentException
public clearOptions()
 

Clear options available within the block.

  • return $this
public getLabel()
 

Get the option group label.

  • return \Maknz\Slack\BlockElement\Text
public getOptions()
 

Get options available within the block.

  • return \Maknz\Slack\Object\Option[]
public getOptionsAsArrays()
 

Get options available within the block in array format.

  • return array
public hasSelectedOption()
 

Get whether the option group has a selected option.

  • return bool
public setLabel( $label)
 

Set the option group label.

  • param mixed $label
  • return $this
  • throws \InvalidArgumentException
public setOptions(array $options)
 

Set options available within the block.

  • param array $options
  • return $this
  • throws \InvalidArgumentException
public toArray()
 

Convert the block to its array representation.

  • return array
Properties
protected static $availableAttributes = ['label' => 'label', 'options' => 'options']
 

Internal attribute to property map.

  • var array
protected $label = NULL
 

Option group label.

  • var \Maknz\Slack\BlockElement\Text
protected $options = []
 

Options available within the block.

  • var \Maknz\Slack\Object\Option[]
Methods
protected Maknz\Slack\Payload::fillProperties(array $attributes) : self
 
  • param array $attributes
  • return $this
Properties
protected static $availableAttributes = ['label' => 'label', 'options' => 'options']
 

Internal attribute to property map.

  • var array
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration