public function generate($model, $version) {
		$operations = Configure::read('FileStorage.imageSizes.' . $model . '.' . $version);
		$options = [
			'overwrite' => !$this->params['keep-old-versions']
		];

		if (empty($operations)) {
			$this->out(__d('file_storage', 'Invalid table or version.'));
			$this->_stop();
		}

		try {
			$this->_loop('generate', $model, [$version => $operations], $options);
		} catch (Exception $e) {
			$this->abort($e->getMessage());
		}
	}
public function generate($model, $version) {
		$operations = Configure::read('FileStorage.imageSizes.' . $model . '.' . $version);
		$options = [
			'overwrite' => !$this->params['keep-old-versions']
		];

		if (empty($operations)) {
			$this->out(__d('file_storage', 'Invalid table or version.'));
			$this->_stop();
		}

		try {
			$this->_loop('generate', $model, [$version => $operations], $options);
		} catch (Exception $e) {
			$this->abort($e->getMessage());
		}
	}
public function generate ( $ model , $ version ) { $ operations = Configure :: read ( 'FileStorage.imageSizes.' . $ model . '.' . $ version ) ; $ options = [ 'overwrite' => ! $ this -> params [ 'keep-old-versions' ] ] ; if ( empty ( $ operations ) ) { $ this -> out ( __d ( 'file_storage' , 'Invalid table or version.' ) ) ; $ this -> _stop ( ) ; } try { $ this -> _loop ( 'generate' , $ model , [ $ version => $ operations ] , $ options ) ; } catch ( Exception $ e ) { $ this -> abort ( $ e -> getMessage ( ) ) ; } }
Generate a given image version.

@param string $model
@param string $version
@return void
Generate a given image version .