Пример #1
0
 public function before_save()
 {
     parent::before_save();
     $this->url = WXInflections::to_url($this->title);
 }
Пример #2
0
 /**
  * set the url up
  */
 public function before_save()
 {
     $this->url = WXInflections::to_url($this->name);
 }
Пример #3
0
 public function generate_url()
 {
     if (!$this->title || $this->status == 4 || $this->status == 5 || $this->status == 6) {
         return false;
     }
     //create the url from the title
     $this->url = WXInflections::to_url($this->title);
     //check to make sure the url does not clash with a section url (this would cause the content to be found as a section)
     $this->avoid_section_url_clash();
     //make sure the url is unique
     $this->url = $this->avoid_url_clash();
 }
Пример #4
0
 public function before_save()
 {
     $this->url = WXInflections::to_url($this->subject);
     $this->date_created = date("Y-m-d H:i:s");
 }