Esempio n. 1
0
 /**
  * Method to change the title & alias.
  *
  * @param   integer  $category_id  The id of the parent.
  * @param   string   $alias        The alias.
  * @param   string   $name         The title.
  *
  * @return  array  Contains the modified title and alias.
  *
  * @since   3.1
  */
 protected function generateNewTitle($category_id, $alias, $name)
 {
     // Alter the title & alias
     $table = $this->getTable();
     while ($table->load(array('alias' => $alias, 'catid' => $category_id))) {
         if ($name == $table->title) {
             $name = String::increment($name);
         }
         $alias = String::increment($alias, 'dash');
     }
     return array($name, $alias);
 }
Esempio n. 2
0
 /**
  * Method to change the title & alias.
  *
  * @param   integer $category_id The id of the category.
  * @param   string  $alias       The alias.
  * @param   string  $name        The name.
  *
  * @return    array  Contains the modified title and alias.
  *
  * @since    2.0.0-BETA2
  */
 protected function _generateNewTitle($category_id, $alias, $name)
 {
     while (KunenaForumCategoryHelper::getAlias($category_id, $alias)) {
         $name = \Joomla\String\String::increment($name);
         $alias = \Joomla\String\String::increment($alias, 'dash');
     }
     return array($name, $alias);
 }