public function save() { if (!$this->exists() && !isset($this->sortorder) && !$this->_ignore_sortorder) { $is_occupied = self::isOccupiedSortorder($this); if ($this->_preferred_sortorder !== null && !$is_occupied) { $sortorder = $this->_preferred_sortorder; } if (!isset($sortorder)) { $sortorder = self::getMaxSortorder($this) + 1; } $this->sortorder = $sortorder; } parent::save(); }
public function save() { parent::save(); $this->permissions->commit($this->id); }