vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Entity/FormatOptions.php line 17

  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Bundle\MediaBundle\Entity;
  11. /**
  12.  * Entity for the format-options of a file-version.
  13.  */
  14. class FormatOptions
  15. {
  16.     /**
  17.      * @var int
  18.      */
  19.     private $cropX;
  20.     /**
  21.      * @var int
  22.      */
  23.     private $cropY;
  24.     /**
  25.      * @var int
  26.      */
  27.     private $cropWidth;
  28.     /**
  29.      * @var int
  30.      */
  31.     private $cropHeight;
  32.     /**
  33.      * @var string
  34.      */
  35.     private $formatKey;
  36.     /**
  37.      * @var FileVersion
  38.      */
  39.     private $fileVersion;
  40.     /**
  41.      * Set cropX.
  42.      *
  43.      * @param int $cropX
  44.      *
  45.      * @return FormatOptions
  46.      */
  47.     public function setCropX($cropX)
  48.     {
  49.         $this->cropX = (int) \round($cropX);
  50.         return $this;
  51.     }
  52.     /**
  53.      * Get cropX.
  54.      *
  55.      * @return int
  56.      */
  57.     public function getCropX()
  58.     {
  59.         return $this->cropX;
  60.     }
  61.     /**
  62.      * Set cropY.
  63.      *
  64.      * @param int $cropY
  65.      *
  66.      * @return FormatOptions
  67.      */
  68.     public function setCropY($cropY)
  69.     {
  70.         $this->cropY = (int) \round($cropY);
  71.         return $this;
  72.     }
  73.     /**
  74.      * Get cropY.
  75.      *
  76.      * @return int
  77.      */
  78.     public function getCropY()
  79.     {
  80.         return $this->cropY;
  81.     }
  82.     /**
  83.      * Set cropWidth.
  84.      *
  85.      * @param int $cropWidth
  86.      *
  87.      * @return FormatOptions
  88.      */
  89.     public function setCropWidth($cropWidth)
  90.     {
  91.         $this->cropWidth = (int) \round($cropWidth);
  92.         return $this;
  93.     }
  94.     /**
  95.      * Get cropWidth.
  96.      *
  97.      * @return int
  98.      */
  99.     public function getCropWidth()
  100.     {
  101.         return $this->cropWidth;
  102.     }
  103.     /**
  104.      * Set cropHeight.
  105.      *
  106.      * @param int $cropHeight
  107.      *
  108.      * @return FormatOptions
  109.      */
  110.     public function setCropHeight($cropHeight)
  111.     {
  112.         $this->cropHeight = (int) \round($cropHeight);
  113.         return $this;
  114.     }
  115.     /**
  116.      * Get cropHeight.
  117.      *
  118.      * @return int
  119.      */
  120.     public function getCropHeight()
  121.     {
  122.         return $this->cropHeight;
  123.     }
  124.     /**
  125.      * Set formatKey.
  126.      *
  127.      * @param string $formatKey
  128.      *
  129.      * @return FormatOptions
  130.      */
  131.     public function setFormatKey($formatKey)
  132.     {
  133.         $this->formatKey $formatKey;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Get formatKey.
  138.      *
  139.      * @return string
  140.      */
  141.     public function getFormatKey()
  142.     {
  143.         return $this->formatKey;
  144.     }
  145.     /**
  146.      * Set fileVersion.
  147.      *
  148.      * @return FormatOptions
  149.      */
  150.     public function setFileVersion(FileVersion $fileVersion)
  151.     {
  152.         $this->fileVersion $fileVersion;
  153.         return $this;
  154.     }
  155.     /**
  156.      * Get fileVersion.
  157.      *
  158.      * @return FileVersion
  159.      */
  160.     public function getFileVersion()
  161.     {
  162.         return $this->fileVersion;
  163.     }
  164. }