|
@@ -56,6 +56,13 @@ class Profile implements TenancyIdTraitInterface
|
|
|
* @JMS\Exclude
|
|
|
*/
|
|
|
protected $onus;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var string
|
|
|
+ *
|
|
|
+ * @ORM\Column(type="string", nullable=true)
|
|
|
+ */
|
|
|
+ protected $template;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -146,11 +153,30 @@ class Profile implements TenancyIdTraitInterface
|
|
|
return $this->download;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getDownloadAsK()
|
|
|
+ {
|
|
|
+ return round($this->getDownload() / 1000, 2) . "k";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getUploadAsK()
|
|
|
+ {
|
|
|
+ return round($this->getUpload() / 1000, 2) . "k";
|
|
|
+ }
|
|
|
|
|
|
- function getDownloadAsK(){return round($this->getDownload()/1000,2)."k"; }
|
|
|
- function getUploadAsK() {return round($this->getUpload()/1000,2)."k"; }
|
|
|
-
|
|
|
- function getRadiusName() {return preg_replace("|[^A-Za-z0-9]|", "-", $this->name); }
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getRadiusName()
|
|
|
+ {
|
|
|
+ return preg_replace("|[^A-Za-z0-9]|", "-", $this->name);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Constructor
|
|
|
*/
|
|
@@ -181,5 +207,28 @@ class Profile implements TenancyIdTraitInterface
|
|
|
public function removeOnus(\FTTHBundle\Entity\ONU $onus)
|
|
|
{
|
|
|
$this->onus->removeElement($onus);
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getTemplate()
|
|
|
+ {
|
|
|
+ return $this->template;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string $template
|
|
|
+ *
|
|
|
+ * @return Profile
|
|
|
+ */
|
|
|
+ public function setTemplate($template)
|
|
|
+ {
|
|
|
+ $this->template = $template;
|
|
|
+
|
|
|
+ return $this;
|
|
|
}
|
|
|
+
|
|
|
}
|