Skip to content

[bug] Viewhelper for getting image dimension - #14

Open
huyngeng wants to merge 1 commit into
t3kit:masterfrom
huyngeng:bug-64
Open

[bug] Viewhelper for getting image dimension#14
huyngeng wants to merge 1 commit into
t3kit:masterfrom
huyngeng:bug-64

Conversation

@huyngeng

@huyngeng huyngeng commented Jan 25, 2017

Copy link
Copy Markdown

Hello @jozefspisiak

Please review the code.
And here id the link for the News list that use this viewhelper: t3kit/theme_t3kit#118
Waiting for your feedback!

Thanks

$dimension = $processedImage->getProperty($dimensionType);

} catch (ResourceDoesNotExistException $e) {
// thrown if file does not exist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the exception not thrown? It is just suppressed.

} catch (ResourceDoesNotExistException $e) {
// thrown if file does not exist
} catch (\UnexpectedValueException $e) {
// thrown if a file has been replaced with a folder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the exception not thrown? It is just suppressed.

} catch (\UnexpectedValueException $e) {
// thrown if a file has been replaced with a folder
} catch (\RuntimeException $e) {
// RuntimeException thrown if a file is outside of a storage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the exception not thrown? It is just suppressed.

} catch (\RuntimeException $e) {
// RuntimeException thrown if a file is outside of a storage
} catch (\InvalidArgumentException $e) {
// thrown if file storage does not exist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the exception not thrown? It is just suppressed.

use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Fluid\Core\ViewHelper\Exception;

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an example in the Class DOC on how to use the viewhelper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants