public function Device::setDimensions in Responsive Theme Preview 8
Sets the device dimension.
Parameters
array $dimensions: Associative array containing the following properties:
- weight: the width (integer).
- height: the height (integer).
- dppx: the dots per pixel (integer).
Overrides DeviceInterface::setDimensions
File
- src/
Entity/ Device.php, line 128
Class
- Device
- Defines the Device entity.
Namespace
Drupal\responsive_preview\EntityCode
public function setDimensions(array $dimensions) {
$dimensions += [
'width' => 0,
'height' => 0,
'dppx' => 0,
];
$this->dimensions = $dimensions;
}