Bug #49653
closedImage Resize & typolink in extbase extension in TYPO3 6.1.1
100%
Description
Hi,
I have a problem with resizing image and making typolink in repository file of extbase extension in typo3 version 6.1.1.
Its already working in the typo3 4.7.7 extbase extension.
I have used below code and its showing me error:
Fatal error: Class 'TYPO3\Profile\Domain\Repository\t3lib_div' not found in repository class file.
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$imageObj['img']='IMAGE';
$imageObj['img.']['file']= "uploads/tx_download/".$row["image"];
$imageObj['img.']['file.']['width']='80';
$imageObj['img.']['file.']['height']='115';
$imageObj['img.']['file.']['params']='-quality 100';
$image = $this->cObj->IMG_RESOURCE($imageObj['img.']);
Can anyone help me in finding the solution?
Updated by Jainish Senjaliya over 11 years ago
- Assignee set to Dmitry Dulepov
Hello Sir/Madam,
I have also face same Problem.
Can you please Guide me. IT will be great help me :
Thanks in advance
Updated by Jignesh Prajapati over 11 years ago
Sejal no-lastname-given wrote:
Hi,
I have a problem with resizing image and making typolink in repository file of extbase extension in typo3 version 6.1.1.
Its already working in the typo3 4.7.7 extbase extension.
I have used below code and its showing me error:
Fatal error: Class 'TYPO3\Profile\Domain\Repository\t3lib_div' not found in repository class file.$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$imageObj['img']='IMAGE';
$imageObj['img.']['file']= "uploads/tx_download/".$row["image"];
$imageObj['img.']['file.']['width']='80';
$imageObj['img.']['file.']['height']='115';
$imageObj['img.']['file.']['params']='-quality 100';
$image = $this->cObj->IMG_RESOURCE($imageObj['img.']);Can anyone help me in finding the solution?
In your code please try to replace below line
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
with
$this->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tslib_cObj');
I hope it will work for you.
Regards,
Jignesh
Updated by Sejal no-lastname-given over 11 years ago
- % Done changed from 0 to 100
Thanks for you help.
Updated by Wouter Wolters over 11 years ago
- Status changed from New to Resolved
- Assignee deleted (
Dmitry Dulepov)