public function before_save() { parent::before_save(); $this->url = WXInflections::to_url($this->title); }
/** * set the url up */ public function before_save() { $this->url = WXInflections::to_url($this->name); }
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(); }
public function before_save() { $this->url = WXInflections::to_url($this->subject); $this->date_created = date("Y-m-d H:i:s"); }