concrete/src/File/Set/Set.php
public static function create($setName, $fsOverrideGlobalPermissions = 0, $u = false, $type = self::TYPE_PUBLIC)
    {
        if (is_object($u) && $u->isRegistered()) {
            $uID = $u->getUserID();
        } else {
            if ($u) {
                $uID = $u;
            } else {
                $uID = 0;
            }
        }

        $db = Database::connection();
        $db->insert(
            "FileSets",
            array(
                'fsType' => $type,
                'uID' => $uID,
                'fsName' => $setName,
            )
        );
        $fsID = $db->lastInsertId();
        $fs = static::getByID($fsID);

        $fe = new \Concrete\Core\File\Event\FileSet($fs);
        Events::dispatch('on_file_set_add', $fe);

        return $fs;
    }
public static function create($setName, $fsOverrideGlobalPermissions = 0, $u = false, $type = self::TYPE_PUBLIC)
    {
        if (is_object($u) && $u->isRegistered()) {
            $uID = $u->getUserID();
        } else {
            if ($u) {
                $uID = $u;
            } else {
                $uID = 0;
            }
        }

        $db = Database::connection();
        $db->insert(
            "FileSets",
            array(
                'fsType' => $type,
                'uID' => $uID,
                'fsName' => $setName,
            )
        );
        $fsID = $db->lastInsertId();
        $fs = static::getByID($fsID);

        $fe = new \Concrete\Core\File\Event\FileSet($fs);
        Events::dispatch('on_file_set_add', $fe);

        return $fs;
    }
public static function create ( $ setName , $ fsOverrideGlobalPermissions = 0 , $ u = false , $ type = self :: TYPE_PUBLIC ) { if ( is_object ( $ u ) && $ u -> isRegistered ( ) ) { $ uID = $ u -> getUserID ( ) ; } else { if ( $ u ) { $ uID = $ u ; } else { $ uID = 0 ; } } $ db = Database :: connection ( ) ; $ db -> insert ( "FileSets" , array ( 'fsType' => $ type , 'uID' => $ uID , 'fsName' => $ setName , ) ) ; $ fsID = $ db -> lastInsertId ( ) ; $ fs = static :: getByID ( $ fsID ) ; $ fe = new \ Concrete \ Core \ File \ Event \ FileSet ( $ fs ) ; Events :: dispatch ( 'on_file_set_add' , $ fe ) ; return $ fs ; }
Adds a File set.

@param string $setName
@param int $fsOverrideGlobalPermissions
@param bool|\User $u
@param int $type

@return Set
Adds a File set .