1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Taxonomy\Terms;
13
14 class Model extends \ICanBoogie\ActiveRecord\Model
15 {
16 17 18 19
20 public function save(array $properties, $key=null, array $options=array())
21 {
22 if (isset($properties[Term::TERM]) && empty($properties[Term::TERMSLUG]))
23 {
24 $properties[Term::TERMSLUG] = \Icybee\slugize($properties[Term::TERM]);
25 }
26 else if (isset($properties[Term::TERMSLUG]))
27 {
28 $properties[Term::TERMSLUG] = \ICanBoogie\normalize($properties[Term::TERMSLUG]);
29 }
30
31 return parent::save($properties, $key, $options);
32 }
33 }