Set value boolean in symfony and update -


i trying set value of boolean during update. return error.

here entity.

/**  * set status  *  * @param boolean $status  * @return congressstaffer  */   public function setmailstatus($status) {     $this->status = $status;      return $this; }  /**  * status  *  * @return boolean  */ public function getmailstatus() {     return $this->status; } 

$staffer->setmailstatus();

$em->flush();

what kind of error did get?

also, need pass value setter,

$staffer->setmailstatus(true); // or false 

or, define default value in setter,

public function setmailstatus($status = false) // or true {     // ... } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -