public function rename($tagId, $caption) { $tag = new Tag($this->getDataSource()); $tag->loadById((int) $tagId); $tag->setValue('caption', $caption); $tag->setValue('slug', slugify($caption)); $tag->setInheritableAttributesValues(array('attributes' => array('title' => $caption)), true); $tag->update(); return $tag; }