public function afterSave($event) { $model = $this->getOwner(); $category_ids = array(); if (!empty($_POST['category'])) { $category_ids = array_unique($_POST['category']); } //print_r($_POST['category']); CategoryUtils::relinkCategories($this->getOwner(), $category_ids); }