Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
b960ab3d
Unverified
Commit
b960ab3d
authored
Oct 15, 2018
by
Motch Julien
Committed by
GitHub
Oct 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing ResizeCanvas.php
Missing ResizeCanvas.php
parent
230d6232
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
ResizeCanvas.php
...s/Media/Image/Intervention/Manipulations/ResizeCanvas.php
+28
-0
No files found.
Modules/Media/Image/Intervention/Manipulations/ResizeCanvas.php
0 → 100644
View file @
b960ab3d
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
ResizeCanvas
implements
ImageHandlerInterface
{
private
$defaults
=
[
'width'
=>
200
,
'height'
=>
200
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
$callback
=
isset
(
$options
[
'callback'
])
?
$options
[
'callback'
]
:
null
;
return
$image
->
resizeCanvas
(
$options
[
'width'
],
$options
[
'height'
],
$callback
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment