public function addCreatorPermission($permission, $update = true) { if ($this->get('type') == 'matrix' && isset($this->data['creator'])) { $this->data['creator'] |= $permission; } else { $this->data['creator'] = $permission; } if ($update) { $this->save(); } }