/** * Registers jqueryCrop */ protected function registerPlugin($options) { $view = $this->getView(); CropperAsset::register($view); $id = $this->options['id']; $view->registerJs("jQuery('#{$id}').cropImage(" . json_encode($options) . ");"); }
/** * Registers jqueryCrop */ protected function registerPlugin($options) { $view = $this->getView(); CropperAsset::register($view); $id = $this->options['id']; $view->registerJs("jQuery('#{$id}').cropper({\n \t aspectRatio: NaN,\n \t crop: function(e) {\n \n \t }\n \t});"); }