Phosphorum\Models\Posts::beforeValidationOnCreate PHP Method

beforeValidationOnCreate() public method

    public function beforeValidationOnCreate()
    {
        $this->deleted = 0;
        $this->number_views = 0;
        $this->number_replies = 0;
        $this->sticked = self::IS_UNSTICKED;
        $this->accepted_answer = 'N';
        $this->locked = 'N';
        $this->status = 'A';
        if ($this->title && !$this->slug) {
            $this->slug = $this->getDI()->getShared('slug')->generate($this->title);
        }
    }