Modules/Groupware/Files/Folder/Model/Folder.php
\Conjoon_Modules_Groupware_Files_Folder_Model_Folder
Package: Conjoon\Groupware\Files\ModelTable data gateway. Models the table <tt>groupware_files_folders</tt>.
- Parent(s)
-
\Conjoon_Db_Table
<
\Zend_Db_Table
- Author
-
Thorsten Suckow-Homberg
- Category
- Model
- Uses
-
\Conjoon_Db_Table
Properties



string
$_name= ''groupware_files_folders''
The name of the table in the underlying datastore this
class represents.
Default value'groupware_files_folders'Details
- Type
- string



string
$_primary= ''id''
The name of the column that denotes the primary key for this table
Default value'id'Details
- Type
- string
Methods



__construct(
string | array $config
=
array(), \unknown_type $definition
=
null
)
:
void
This constructor automatically prepends the prefix as defined using setTablePrefix()
to this table's name.
Parameters
| Name |
Type |
Description |
| $config |
string | array |
string can reference a Zend_Registry key for a db adapter OR it can refernece the name of a table |
| $definition |
\unknown_type |
|



addFolder(
integer $userId, string $name, integer $parentId, $type, $isLocked
=
false, $isChildAllowed
=
true
)
:
integerAdds a folder to the specified folder id.
Parameters
| Name |
Type |
Description |
| $userId |
integer |
|
| $name |
string |
|
| $parentId |
integer |
|
| $type |
|
|
| $isLocked |
|
|
| $isChildAllowed |
|
|
Returns
Throws



createTempFolderForUser(
integer $userId
)
:
integerCreates the temp folder for the specified user id.
Parameters
| Name |
Type |
Description |
| $userId |
integer |
|
Returns
Throws



getFolderIdForName(
string $name, integer $parentId
)
:
integerReturns the id of the folder with the the sppecified name for the specified
parent folder. Returns 0 if no wolder was found.
Parameters
| Name |
Type |
Description |
| $name |
string |
|
| $parentId |
integer |
|
Returns
Throws



getTempFolderIdForUser(
integer $userId
)
:
integerReturns the base temp folder id for the specified user, i.e. the folder
with type "temp".
Returns 0 if the folder could not be found
Parameters
| Name |
Type |
Description |
| $userId |
integer |
|
Returns
Throws