Bug #49653
closed
Image Resize & typolink in extbase extension in TYPO3 6.1.1
Added by Sejal no-lastname-given over 11 years ago.
Updated about 6 years ago.
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?
- 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
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
- % Done changed from 0 to 100
- Status changed from New to Resolved
- Assignee deleted (
Dmitry Dulepov)
- Status changed from Resolved to Closed
Also available in: Atom
PDF