ElggSite::create PHP Method

create() protected method

protected create ( )
    protected function create()
    {
        global $CONFIG;
        $guid = parent::create();
        $name = sanitize_string($this->attributes['name']);
        $description = sanitize_string($this->attributes['description']);
        $url = sanitize_string($this->attributes['url']);
        $query = "INSERT into {$CONFIG->dbprefix}sites_entity\n\t\t\t(guid, name, description, url) values ({$guid}, '{$name}', '{$description}', '{$url}')";
        $result = $this->getDatabase()->insertData($query);
        if ($result === false) {
            // TODO(evan): Throw an exception here?
            return false;
        }
        return $guid;
    }