Created
August 2, 2016 11:43
-
-
Save deichbrise/834ed939c34904ea85c1c81f32a8d131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Machine extends AbstractEntity | |
{ | |
/** | |
* | |
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference | |
*/ | |
protected $pdf = null; | |
/** | |
* Returns the pdf | |
* | |
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $pdf | |
*/ | |
public function getPdf() | |
{ | |
return $this->pdf; | |
} | |
/** | |
* Sets the pdf | |
* | |
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $pdf | |
* @return void | |
*/ | |
public function setPdf(\TYPO3\CMS\Extbase\Domain\Model\FileReference $pdf) | |
{ | |
$this->pdf = $pdf; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RestController extends ActionController { | |
public function filterSledPositionsAction() { | |
if($this->request->hasArgument('machine')) { | |
$machineUid = $this->request->getArgument('machine'); | |
/** @var \Deichbrise\GoeltenbodtProducts\Domain\Model\Machine $machine */ | |
$machine = $this->machineRepository->findByIdentifier($machineUid); | |
var_dump($machine->getPdf()->getOriginalResource()->getOriginalFile()->getPublicUrl());die(); | |
$this->view->assign('value', $machine->getSledPosition()->toArray()); | |
} else { | |
$this->view->assign('value', null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment