Pimcore\Model\Object\QuantityValue\Unit\Dao::getById PHP Method

getById() public method

public getById ( $id ) : void
return void
    public function getById($id)
    {
        $classRaw = $this->db->fetchRow("SELECT * FROM " . self::TABLE_NAME . " WHERE id=" . $this->db->quote($id));
        if (empty($classRaw)) {
            throw new \Exception("Unit " . $id . " not found.");
        }
        $this->assignVariablesToModel($classRaw);
    }