ContentList::beforeSave PHP Method

beforeSave() protected method

protected beforeSave ( )
    protected function beforeSave()
    {
        if (parent::beforeSave()) {
            if ($this->isNewRecord) {
                $this->created = time();
            }
            // We need to start to convert all the
            // Model attributes to array for serialize to the value
            $arr['type'] = $this->type;
            $arr['lang'] = $this->lang;
            $arr['content_type'] = $this->content_type;
            $arr['terms'] = $this->terms;
            $arr['tags'] = $this->tags;
            $arr['paging'] = $this->paging;
            $arr['number'] = $this->number;
            $arr['criteria'] = $this->criteria;
            $arr['manual_list'] = $this->manual_list;
            $this->value = serialize($arr);
            return true;
        } else {
            return false;
        }
    }