Elgg\WidgetDefinition::__construct PHP Method

__construct() public method

WidgetDefinition constructor
public __construct ( string $id )
$id string Identifier of the widget
    public function __construct($id)
    {
        if (empty($id)) {
            throw new \InvalidParameterException('Id missing for WidgetDefinition');
        }
        $this->id = $id;
    }