Esempio n. 1
0
 public function __construct(ActiveTable $activeTable, $container)
 {
     $this->id = $activeTable->getId();
     // Get table type photo
     $helper = $container->get('vich_uploader.templating.helper.uploader_helper');
     $originTableTypePicture = $container->getParameter('site_host') . $container->getParameter('base_folder_url') . $helper->asset($activeTable->getTableType(), 'table_type');
     $bigTableTypePicture = str_replace($activeTable->getTableType()->getFileName(), $activeTable->getTableType()->getBigFileName(), $originTableTypePicture);
     if (@file_exists($bigTableTypePicture)) {
         $this->tableTypePicture = $bigTableTypePicture;
     } else {
         $this->tableTypePicture = $bigTableTypePicture;
         //Temporary solution
     }
     $this->tableNumber = $activeTable->getTableNumber();
     $this->topPosition = $activeTable->getTopPosition();
     $this->leftPosition = $activeTable->getLeftPosition();
     $this->angle = $activeTable->getAngle();
 }