Pimcore\Model\Asset\Dao::create PHP Method

create() public method

Create a the new object in database, an get the new assigned ID
public create ( )
    public function create()
    {
        try {
            $this->db->insert("assets", ["filename" => $this->model->getFilename(), "path" => $this->model->getRealPath(), "parentId" => $this->model->getParentId()]);
            $date = time();
            $this->model->setId($this->db->lastInsertId());
        } catch (\Exception $e) {
            throw $e;
        }
    }