Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Api/Keyboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function toArray()
'Buttons' => $this->getButtonsApiArray(),
'BgColor' => $this->getBgColor(),
'DefaultHeight' => $this->getDefaultHeight(),
'InputFieldState' => $this->getInputFieldState(),
];
}

Expand Down
34 changes: 34 additions & 0 deletions src/Api/Keyboard/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ class Button extends Entity
*/
protected $Image;

/**
* Type of scaling the bounds of an image to the bounds of the view.
*
* Avail: crop, fill, fit
*
* @var string
*/
protected $ImageScaleType;

/**
* Text to be displayed on the button. Can contain some HTML tags.
*
Expand Down Expand Up @@ -160,6 +169,7 @@ public function toArray()
'ActionType' => $this->getActionType(),
'ActionBody' => $this->getActionBody(),
'Image' => $this->getImage(),
'ImageScaleType' => $this->getImageScaleType(),
'Text' => $this->getText(),
'TextVAlign' => $this->getTextVAlign(),
'TextHAlign' => $this->getTextHAlign(),
Expand Down Expand Up @@ -385,6 +395,30 @@ public function setImage($Image)
return $this;
}

/**
* Get the value of image scaling type.
*
* @return string
*/
public function getImageScaleType()
{
return $this->ImageScaleType;
}

/**
* Set the value of image scaling type.
*
* @param string ImageScaleType
*
* @return self
*/
public function setImageScaleType($ImageScaleType)
{
$this->ImageScaleType = $ImageScaleType;

return $this;
}

/**
* Get the value of Text to be displayed on the button. Can contain some HTML tags.
*
Expand Down