Skip to content

Commit

Permalink
[BUGFIX] use full path to model FileReference (instead of an import…
Browse files Browse the repository at this point in the history
…), otherwise it will try to use the model of ext:news

ref #23
  • Loading branch information
cdaecke committed Feb 8, 2022
1 parent 6e6f251 commit d4216a6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Classes/Domain/Model/News.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
*/

use TYPO3\CMS\Extbase\Domain\Model\FileReference;

/**
* News
Expand Down Expand Up @@ -53,8 +52,9 @@ public function setTxMdNewsfrontendFeuser(\TYPO3\CMS\Extbase\Domain\Model\Fronte

/**
* Get first falMedia element of news
* Do not replace qualifier with an import, because it will try to use `FileReference` of ext:news
*
* @return FileReference|null
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference|null
*/
public function getFirstFalMedia()
{
Expand All @@ -72,7 +72,7 @@ public function getFirstFalMedia()
/**
* Get first falRelatedFiles element of news
*
* @return FileReference|null
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference|null
*/
public function getFirstFalRelatedFiles()
{
Expand All @@ -95,10 +95,10 @@ public function getFirstFalRelatedFiles()
* uid_foreign, tablenames and fieldname
* Is this the intended behaviour???
*
* @param FileReference $imageToRemove The FileReference to be removed
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove The FileReference to be removed
* @return void
*/
public function removeFalMedia(FileReference $imageToRemove)
public function removeFalMedia(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove)
{
$this->falMedia->detach($imageToRemove);
}
Expand All @@ -111,10 +111,10 @@ public function removeFalMedia(FileReference $imageToRemove)
* uid_foreign, tablenames and fieldname
* Is this the intended behaviour???
*
* @param FileReference $fileToRemove The FileReference to be removed
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove The FileReference to be removed
* @return void
*/
public function removeFalRelatedFiles(FileReference $fileToRemove)
public function removeFalRelatedFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove)
{
$this->falRelatedFiles->detach($fileToRemove);
}
Expand Down

0 comments on commit d4216a6

Please sign in to comment.