Swat/SwatImageCropper.php
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $this->autoCropBoxDimensions();

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = 'swat-image-cropper yui-skin-sam';
        $div_tag->open();

        $image_tag = new SwatHtmlTag('img');
        $image_tag->id = $this->id . '_image';
        $image_tag->src = $this->image_uri;
        $image_tag->width = $this->image_width;
        $image_tag->height = $this->image_height;
        $image_tag->alt = Swat::_('Crop Image');
        $image_tag->display();

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'hidden';

        $input_tag->id = $this->id . '_width';
        $input_tag->name = $this->id . '_width';
        $input_tag->value = $this->crop_width;
        $input_tag->display();

        $input_tag->id = $this->id . '_height';
        $input_tag->name = $this->id . '_height';
        $input_tag->value = $this->crop_height;
        $input_tag->display();

        $input_tag->id = $this->id . '_x';
        $input_tag->name = $this->id . '_x';
        $input_tag->value = $this->crop_left;
        $input_tag->display();

        $input_tag->id = $this->id . '_y';
        $input_tag->name = $this->id . '_y';
        $input_tag->value = $this->crop_top;
        $input_tag->display();

        $div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $this->autoCropBoxDimensions();

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = 'swat-image-cropper yui-skin-sam';
        $div_tag->open();

        $image_tag = new SwatHtmlTag('img');
        $image_tag->id = $this->id . '_image';
        $image_tag->src = $this->image_uri;
        $image_tag->width = $this->image_width;
        $image_tag->height = $this->image_height;
        $image_tag->alt = Swat::_('Crop Image');
        $image_tag->display();

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'hidden';

        $input_tag->id = $this->id . '_width';
        $input_tag->name = $this->id . '_width';
        $input_tag->value = $this->crop_width;
        $input_tag->display();

        $input_tag->id = $this->id . '_height';
        $input_tag->name = $this->id . '_height';
        $input_tag->value = $this->crop_height;
        $input_tag->display();

        $input_tag->id = $this->id . '_x';
        $input_tag->name = $this->id . '_x';
        $input_tag->value = $this->crop_left;
        $input_tag->display();

        $input_tag->id = $this->id . '_y';
        $input_tag->name = $this->id . '_y';
        $input_tag->value = $this->crop_top;
        $input_tag->display();

        $div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
public function display ( ) { if ( ! $ this -> visible ) { return ; } parent :: display ( ) ; $ this -> autoCropBoxDimensions ( ) ; $ div_tag = new SwatHtmlTag ( 'div' ) ; $ div_tag -> id = $ this -> id ; $ div_tag -> class = 'swat-image-cropper yui-skin-sam' ; $ div_tag -> open ( ) ; $ image_tag = new SwatHtmlTag ( 'img' ) ; $ image_tag -> id = $ this -> id . '_image' ; $ image_tag -> src = $ this -> image_uri ; $ image_tag -> width = $ this -> image_width ; $ image_tag -> height = $ this -> image_height ; $ image_tag -> alt = Swat :: _ ( 'Crop Image' ) ; $ image_tag -> display ( ) ; $ input_tag = new SwatHtmlTag ( 'input' ) ; $ input_tag -> type = 'hidden' ; $ input_tag -> id = $ this -> id . '_width' ; $ input_tag -> name = $ this -> id . '_width' ; $ input_tag -> value = $ this -> crop_width ; $ input_tag -> display ( ) ; $ input_tag -> id = $ this -> id . '_height' ; $ input_tag -> name = $ this -> id . '_height' ; $ input_tag -> value = $ this -> crop_height ; $ input_tag -> display ( ) ; $ input_tag -> id = $ this -> id . '_x' ; $ input_tag -> name = $ this -> id . '_x' ; $ input_tag -> value = $ this -> crop_left ; $ input_tag -> display ( ) ; $ input_tag -> id = $ this -> id . '_y' ; $ input_tag -> name = $ this -> id . '_y' ; $ input_tag -> value = $ this -> crop_top ; $ input_tag -> display ( ) ; $ div_tag -> close ( ) ; Swat :: displayInlineJavaScript ( $ this -> getInlineJavaScript ( ) ) ; }
Displays this image cropper
Displays this image cropper