Pimcore\Model\Object\ClassDefinition\CustomLayout::setCreationDate PHP Méthode

setCreationDate() public méthode

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

Usage Example

Exemple #1
0
 /**
  * Create a new record for the object in database
  *
  * @return boolean
  */
 public function create()
 {
     $this->db->insert("custom_layouts", array("name" => $this->model->getName(), "classId" => $this->model->getClassId()));
     $this->model->setId($this->db->lastInsertId());
     $this->model->setCreationDate(time());
     $this->model->setModificationDate(time());
     $this->save();
 }