type . " (wymiary:" . $this->height . "x" . $this->width . "x" . $this->depth . "cm, waga: {$this->weight}kg, ilość: {$this->count})" . ($this->nonstandard ? " niestandardowa" : null); } public function asTableRow() { return sprintf("%s%s%s%d%s", $this->type, $this->height . "x" . $this->width . "x" . $this->depth . "cm", $this->weight . "kg", $this->count, $this->nonstandard ? "tak" : "nie" ); } public function getType() { switch ($this->type) { case "paczka":return "box"; case "koperta":return "envelope"; case "paleta":return "palette"; } } public static function getPackageById($id) { $opt = get_option('polkurier_packages'); if (isset($opt[$id])) { $package = $opt[$id]; $package->id = $id; return $package; } else { return null; } } public function renderForm() { if ($this->id || $this->id == 0) { echo ''; } ?>
nonstandard) { echo "checked"; } ?> value="1">
type == "koperta") { echo "checked"; } ?> >
type == "paczka") { echo "checked"; } ?> >
type == "paleta") { echo "checked"; } ?> >