public updateFlowFlag ( integer $tag_id, boolean $flag = true ) : Illuminate\Database\Eloquent\Model | ||
$tag_id | integer | |
$flag | boolean | |
return | Illuminate\Database\Eloquent\Model |
public function updateFlowFlag($tag_id, $flag = true)
{
$tag = $this->getById($tag_id);
if (!$tag) {
return false;
}
$flow = $flag ? self::FLOW_FLAG_ON : self::FLOW_FLAG_OFF;
$object = array();
$object["flow_flag"] = $flow;
$wkey["id"] = $tag_id;
$ret = $this->update($object, $wkey);
return $this->getById($tag_id);
}