protected function generateNewTitle($category_id, $alias, $title) { // Alter the title & alias $table = $this->getTable(); while ($table->load(array('alias' => $alias, 'catid' => $category_id))) { $title = MString::increment($title); $alias = MString::increment($alias, 'dash'); } return array($title, $alias); }