Pimcore\Model\Element\Note::setCid PHP Method

setCid() public method

public setCid ( $cid )
$cid
    public function setCid($cid)
    {
        $this->cid = (int) $cid;
        return $this;
    }

Usage Example

Beispiel #1
0
 public function noteAddAction()
 {
     $this->checkPermission("notes_events");
     $note = new Element\Note();
     $note->setCid((int) $this->getParam("cid"));
     $note->setCtype($this->getParam("ctype"));
     $note->setDate(time());
     $note->setTitle($this->getParam("title"));
     $note->setDescription($this->getParam("description"));
     $note->setType($this->getParam("type"));
     $note->save();
     $this->_helper->json(["success" => true]);
 }