Advertisement
taliteo

FAL - Usage im Model

Mar 12th, 2013
767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. namespace In2code\In2msiproducts\Domain\Model;
  3.  
  4. class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
  5.     /**
  6.      * fileReferenceRepository
  7.      *
  8.      * @var \In2code\In2msiproducts\Domain\Repository\FileReferenceRepository
  9.      * @inject
  10.      */
  11.     protected $fileReferenceRepository;
  12.  
  13.     /**
  14.      * @var \In2code\In2msiproducts\Domain\Model\FileReference
  15.      */
  16.     protected $productimage;
  17.  
  18.     /**
  19.      * @param \In2code\In2msiproducts\Domain\Model\FileReference $productimage
  20.      */
  21.     public function setProductimage(\In2code\In2msiproducts\Domain\Model\FileReference $productimage) {
  22.         $this->productimage = $productimage;
  23.     }
  24.  
  25.     /**
  26.      * @return \In2code\In2msiproducts\Domain\Model\FileReference
  27.      */
  28.     public function getProductimage() {
  29.         return $this->fileReferenceRepository->findOneByProduct($this);
  30.     }
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement