concrete/src/Device/Device.php
public function getViewportHTML()
    {
        $added_data = array(
            'handle',
            'name',
            'brand',
            'width',
            'height',
            'ratio',
            'agent', );

        $datas = array();
        foreach ($added_data as $key) {
            $datas[] = sprintf('data-device-%s="%s"', $key, h($this->{$key}));
        }

        return sprintf(
            '<div class="ccm-device-viewport" %s style="width:%spx;height:%spx">%s</div>',
            implode(' ', $datas),
            floor($this->getWidth() / $this->getPixelRatio()),
            floor($this->getHeight() / $this->getPixelRatio()),
            '<iframe class="ccm-display-frame"></iframe>');
    }
public function getViewportHTML()
    {
        $added_data = array(
            'handle',
            'name',
            'brand',
            'width',
            'height',
            'ratio',
            'agent', );

        $datas = array();
        foreach ($added_data as $key) {
            $datas[] = sprintf('data-device-%s="%s"', $key, h($this->{$key}));
        }

        return sprintf(
            '<div class="ccm-device-viewport" %s style="width:%spx;height:%spx">%s</div>',
            implode(' ', $datas),
            floor($this->getWidth() / $this->getPixelRatio()),
            floor($this->getHeight() / $this->getPixelRatio()),
            '<iframe class="ccm-display-frame"></iframe>');
    }
public function getViewportHTML ( ) { $ added_data = array ( 'handle' , 'name' , 'brand' , 'width' , 'height' , 'ratio' , 'agent' , ) ; $ datas = array ( ) ; foreach ( $ added_data as $ key ) { $ datas [ ] = sprintf ( 'data-device-%s="%s"' , $ key , h ( $ this -> { $ key } ) ) ; } return sprintf ( '<div class="ccm-device-viewport" %s style="width:%spx;height:%spx">%s</div>' , implode ( ' ' , $ datas ) , floor ( $ this -> getWidth ( ) / $ this -> getPixelRatio ( ) ) , floor ( $ this -> getHeight ( ) / $ this -> getPixelRatio ( ) ) , '<iframe class="ccm-display-frame"></iframe>' ) ; }
Get the HTML for this device's viewport.

@return string
Get the HTML for this device s viewport .