constructor __construct [line 66]
Application_Project __construct(
)
|
|
Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.
Tags:
method addProject [line 92]
int addProject(
array
$sqlData)
|
|
Creates new project. Takes field=>value array with project data as first argument. Returns insert id.
Tags:
Parameters:
method assignUsersToInitProject [line 716]
bool assignUsersToInitProject(
array
$selected_users, int
$project)
|
|
Assign one or more user to the initialized project. All neccessary data like groups and rights will be assigned or copied to the new project. Takes the users array as first and the project id as second argument. Returns bool.
Right now we do not follow user rights, which are not part of the init project skeleton table.
Tags:
Parameters:
method countProjects [line 362]
int countProjects(
[array
$params = array()])
|
|
Method to count available projects. Takes key=>value array with select params as first argument. Returns int.
List of supported params:
- owner, int, optional: Project owner id
- name, string, optional: Project name
Tags:
Parameters:
method deleteProject [line 154]
int deleteProject(
int
$id)
|
|
Removes project from the project table. Takes the project id as first argument. Returns amount of affected rows.
Tags:
Parameters:
method getGroupsFromSkeleton [line 894]
array getGroupsFromSkeleton(
)
|
|
Returns array of groups configured in the skeleton.
Tags:
method getPageTypesFromSkeleton [line 956]
array getPageTypesFromSkeleton(
)
|
|
Returns array of page types configured in the skeleton.
Tags:
method getPodcastCategoriesFromSkeleton [line 1060]
array getPodcastCategoriesFromSkeleton(
)
|
|
Returns array of podcast categories configured in the skeleton.
Tags:
method getRightsFromSkeleton [line 861]
array getRightsFromSkeleton(
)
|
|
Returns array of rights configured in the skeleton.
Tags:
method getTemplateTypesFromSkeleton [line 982]
array getTemplateTypesFromSkeleton(
)
|
|
Returns array of template types configured in the skeleton.
Tags:
method getTextConvertersFromSkeleton [line 1035]
array getTextConvertersFromSkeleton(
)
|
|
Returns array of text converters configured in the skeleton.
Tags:
method getTextMacrosFromSkeleton [line 1008]
array getTextMacrosFromSkeleton(
)
|
|
Returns array of text macros configured in the skeleton.
Tags:
method getUsersFromSkeleton [line 921]
array getUsersFromSkeleton(
)
|
|
Returns array of users configured in the skeleton.
Tags:
method initFromSkeleton [line 808]
bool initFromSkeleton(
int
$project)
|
|
Initializes project using the provided skeleton definition.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method initProjectAdmin [line 607]
int initProjectAdmin(
int
$user)
|
|
Makes sure that a user session is always attached to a project. Returns id of the current project.
Tags:
Parameters:
method initProjectPublicArea [line 647]
int initProjectPublicArea(
)
|
|
Sets WCOM_CURRENT_PROJECT constant. Returns id of the current project.
Tags:
method loadSkeleton [line 839]
Loads skeleton from xml file and stores result in self::_skeleton. If the skeleton was already loaded once, the function will return the cached result.
Tags:
method projectExists [line 498]
bool projectExists(
int
$id)
|
|
Checks if a project with the given id exists or not. Takes the project id as first argument, returns bool.
Tags:
Parameters:
method selectDefaultProject [line 419]
array selectDefaultProject(
)
|
|
Looks for default project and returns array with project information. Throws exception if no default project can be found.
Tags:
method selectProject [line 186]
array selectProject(
int
$id)
|
|
Selects one project. Takes the project id as first argument.
Returns array with project information.
Tags:
Parameters:
method selectProjects [line 251]
array selectProjects(
[array
$params = array()])
|
|
Method to select one or more projects. Takes key=>value array with select params as first argument. Returns array.
List of supported params:
- owner, int, optional: Project owner id
- name, string, optional: Project name
- start, int, optional: row offset
- limit, int, optional: amount of rows to return
- order_marco, string, otpional: How to sort the result set.
Supported macros:
- DATE_ADDED: sort by date added
- DATE_MODIFIED: sort by date modified
- NAME: sort by name
Tags:
Parameters:
method selectProjectUsingUrlName [line 454]
array selectProjectUsingUrlName(
string
$name_url)
|
|
Looks for a project with the given url name and returns array with project information. Throws exception if no project with the given name can be found.
Tags:
Parameters:
method switchProject [line 686]
bool switchProject(
int
$new_project)
|
|
Switches current project. Takes the id of the new project as first argument. Returns bool.
Tags:
Parameters:
method syncGroupsWithSkeleton [line 1363]
bool syncGroupsWithSkeleton(
int
$project, [bool
$drop_obsolete = false])
|
|
Synchronises groups in database with the list of groups deposited in the skeleton. Groups in the database that are not in the skeleton anymore will be removed, differences in descriptions etc.
will be synchronised and new groups in the skeleton will be added.
Takes the project id as first argument and a boolean value whether obsolete groups (= not mentioned in the skeleton anymore) should be dropped or not. Returns bool.
Note: The paramater $drop_obsolete should be used with care. That's because the sync function cannot distinguish whether a group was created from skeleton or by the user through the admin interface. So if drop_obsolete evaluates to true, groups created by the user would be deleted too.
Tags:
Parameters:
method syncLinksBetweenGroupsAndRightsWithSkeleton [line 1231]
bool syncLinksBetweenGroupsAndRightsWithSkeleton(
int
$project)
|
|
Synchronises links between groups and rights using the skeleton.
Only links to rights that are configured in the skeleton will be touched. So it's recommended that you first run the functions to sync rights and groups with the skeleton.
Takes the project id as fisrt argument. Returns bool.
Tags:
Parameters:
method syncLinksBetweenUsersAndGroupsWithSkeleton [line 1754]
bool syncLinksBetweenUsersAndGroupsWithSkeleton(
int
$project)
|
|
Synchronises links between users and groups with skeleton.
Only users configured in the skeleton will be touched.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncLinksBetweenUsersAndProjectsWithSkeleton [line 1636]
bool syncLinksBetweenUsersAndProjectsWithSkeleton(
in
$project)
|
|
Synchronises links between users and projects with skeleton.
Only users that are configured in the skeleton will be touched.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncPageTypesWithSkeleton [line 1918]
bool syncPageTypesWithSkeleton(
int
$project)
|
|
Synchronises page types in database with the list of page types
deposited in the skeleton. Page types in the database that are not in the skeleton anymore will be removed, differences in descriptions etc. will be synchronised and new page types in the skeleton will be added.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncPodcastCategoriesWithSkeleton [line 2449]
bool syncPodcastCategoriesWithSkeleton(
int
$project)
|
|
Synchronises podcast categories in database with the list of podcast categories deposited in the skeleton. Podcast categories in the database that are not in the skeleton anymore will be removed, differences will be synchronised and new podcast categories in the skeleton will be added.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncRightsWithSkeleton [line 1098]
bool syncRightsWithSkeleton(
int
$project)
|
|
Synchronises rights in database with the list of rights deposited in the skeleton. Rights in the database that are not in the skeleton anymore will be removed, differences in descriptions etc.
will be synchronised and new rights in the skeleton will be added. Links between rights and groups won't be updated.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncTemplateTypesWithSkeleton [line 2052]
bool syncTemplateTypesWithSkeleton(
int
$project)
|
|
Synchronises template types in database with the list of template types
deposited in the skeleton. Template types in the database that are not in the skeleton anymore will be removed, differences in descriptions etc. will be synchronised and new template types in the skeleton will be added.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncTextConvertersWithSkeleton [line 2322]
bool syncTextConvertersWithSkeleton(
int
$project)
|
|
Synchronises text converters in database with the list of text converters
deposited in the skeleton. Text converters in the database that are not in the skeleton anymore will be removed, differences in internal_names etc. will be synchronised and new text converters in the skeleton will be added.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncTextMacrosWithSkeleton [line 2186]
bool syncTextMacrosWithSkeleton(
int
$project)
|
|
Synchronises text macros in database with the list of text macros
deposited in the skeleton. Text macros in the database that are not in the skeleton anymore will be removed, differences in internal_names etc. will be synchronised and new text macros in the skeleton will be added.
Takes the project id as first argument. Returns bool.
Tags:
Parameters:
method syncUsersWithSkeleton [line 1505]
bool syncUsersWithSkeleton(
int
$project, [bool
$drop_obsolete = false])
|
|
Sychronises users with skeleton. Adds new users and updates existing ones. If drop_obsolete is true, obsolete/orphaned users will be deleted.
A user is obsolete or orphaned, if it's not attached to any project.
Takes the project id as first argument and a boolean value whether obsolete/orphaned users should be deleted as second argument. Returns bool.
Tags:
Parameters:
method testForUniqueName [line 543]
bool testForUniqueName(
string
$name, [int
$id = null])
|
|
Tests given project name for uniqueness. Takes the project name as
first argument and an optional project id as second argument. If the project id is given, this project won't be considered when checking for uniqueness (useful for updates). Returns boolean true if project name is unique.
Tags:
Parameters:
method updateProject [line 118]
int updateProject(
int
$id, array
$sqlData)
|
|
Updates project. Takes the project id as first argument, a field=>value array with the new row data as second argument. Returns amount of affected rows.
Tags:
Parameters: