Pimcore\Model\Object\ClassDefinition::setCreationDate PHP Method

setCreationDate() public method

public setCreationDate ( integer $creationDate ) : void
$creationDate integer
return void
    public function setCreationDate($creationDate)
    {
        $this->creationDate = (int) $creationDate;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * Create a new record for the object in database
  *
  * @return boolean
  */
 public function create()
 {
     $this->db->insert("classes", ["name" => $this->model->getName()]);
     $this->model->setId($this->db->lastInsertId());
     $this->model->setCreationDate(time());
     $this->model->setModificationDate(time());
     $this->save();
 }