Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
BlockInterface Interface Reference
Inheritance diagram for BlockInterface:
NewWidget Link RecentlyCompared RecentlyViewed ProductsList Block Link Compared Viewed Item Form

Public Member Functions

 addData (array $arr)
 
 setData ($key, $value=null)
 

Detailed Description

Interface \Magento\Widget\Block\BlockInterface

Definition at line 18 of file BlockInterface.php.

Member Function Documentation

◆ addData()

addData ( array  $arr)

Add data to the widget. Retains previous data in the widget.

Parameters
array$arr
Returns
$this

◆ setData()

setData (   $key,
  $value = null 
)

Overwrite data in the widget.

Param $key can be string or array. If $key is string, the attribute value will be overwritten by $value. If $key is an array, it will overwrite all the data in the widget.

Parameters
string | array$key
mixed$value
Returns
\Magento\Framework\DataObject

The documentation for this interface was generated from the following file: