Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Better this way
Browse files Browse the repository at this point in the history
  • Loading branch information
joselfonseca committed Dec 27, 2014
1 parent 75d7aa8 commit e778420
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Joselfonseca/ImageManager/ImageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public function doUpload() {
public function resize($id, $width = null, $height = null){
return $this->execute(RenderFileCommand::class, ['id' => $id, 'width' => $width, 'height' => $height]);
}

public function imageInfo($id){
return $this->ImageRepository->getFileModel($id);
}

public static function getField($params) {
$text = ($params['text']) ? $params['text'] : 'Select File';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public function getFiles();

public function DeleteFile($command);

public function getFileModel($id);

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,9 @@ private function _removeFileFromDb(){
$this->file->DeleteFile();
$this->raise(new FileWasRemovedFromDb($file));
}

public function getFileModel($id){
return $this->model->getFileById($id);
}

}

0 comments on commit e778420

Please sign in to comment.