public
|
#
__construct( flDb $db )
Construct the manager object.
Construct the manager object.
Parameters
|
public
array
|
#
getThemeList( boolean $manager = false )
Get the list of available themes.
Get the list of available themes.
Parameters
- $manager
- true if querying for manager themes; else false.
Returns
array Array of available theme names and descriptions.
|
public
flConfig
|
#
getThemeInfo( string $themeName, boolean $manager = false )
Get the theme information.
Get the theme information.
Parameters
- $themeName
- The name of the theme to query.
- $manager
- true for manager themes; else false.
Returns
|
public
array
|
#
getThemeFields( string $themeName )
Get the list of custom fields used by a theme.
Get the list of custom fields used by a theme.
Parameters
- $themeName
- The name of the theme to query.
Returns
array The config information.
|
public
integer
|
#
addChildTheme( string $name )
Add a theme to the the database.
Add a theme to the the database.
Parameters
- $name
- The name of the theme.
Returns
integer 0 if the theme was not added; else the theme ID.
|
public
boolean
|
#
updateChildTheme( integer $id, string $name )
Update a theme.
Parameters
- $id
- The id of the theme to update.
- $name
- The new name of the theme.
Returns
boolean true if the theme was updated; else false.
|
public
|
#
deleteChildTheme( integer $id )
Delete a theme and all chunks associated with it.
Delete a theme and all chunks associated with it.
Parameters
- $id
- The id of the theme to delete.
|
public
array
|
#
getChildThemesByID( )
Get the list of child themes stored in the database by Id.
Get the list of child themes stored in the database by Id.
Returns
array The available child themes.
|
public
array
|
#
getChildThemeList( string $theme = '' )
Get a list of all the themes available.
Get a list of all the themes available.
Parameters
- $theme
- The theme to get the child themes from.
Returns
array The available themes.
|
public
integer
|
#
getChildThemeCount( )
Get the number of themes in the system.
Get the number of themes in the system.
Returns
integer The number of themes.
|
public
integer
|
#
getCategoryCount( )
Get the number of categories in the system.
Get the number of categories in the system.
Returns
integer The number of categories.
|
public
integer
|
#
addCategory( string $name )
Add a category to the the database.
Add a category to the the database.
Parameters
- $name
- The name of the category.
Returns
integer 0 if the category was not added; else the theme ID.
|
public
boolean
|
#
updateCategory( integer $id, string $name )
Update a category.
Parameters
- $id
- The id of the category to update.
- $name
- The new name of the category.
Returns
boolean true if the category was updated; else false.
|
public
boolean
|
#
deleteCategory( integer $id )
Delete a category and set all items to not be in a category.
Delete a category and set all items to not be in a category.
Parameters
- $id
- The ID of the category to delete.
Returns
boolean true if the category deleted.
|
public
array
|
#
getCategories( )
Get a list of all categories.
Get a list of all categories.
Returns
array Array of id => name pairs.
|
public
integer
|
#
countInCategory( integer $id )
Count the number of elements in a category.
Count the number of elements in a category.
Parameters
Returns
integer The number of elements in the category.
|
public
integer
|
#
createChunk( string $name, string $description, string $content, string $catId, string $themeId, boolean $isTemplate )
Create a chunk.
Parameters
- $name
- The name of the chunk.
- $description
- The description of the chunk.
- $content
- The content of the element.
- $catId
- The category Id to add the chunk to.
- $themeId
- The theme Id to add the chunk to.
- $isTemplate
- true if creating a template; else false.
Returns
integer ID of the new chunk; or false if failed.
|
public
integer
|
#
createSnippet( string $name, string $description, string $content, string $catId )
Create a snippet.
Parameters
- $name
- The name of the snippet.
- $description
- The description of the snippet.
- $content
- The content of the snippet.
- $catId
- The category to add the element to.
Returns
integer ID of the new snippet; or false if failed.
|
public
boolean
|
#
updateChunk( integer $id, string $name, string $description, string $content, string $catId, string $themeId )
Update a chunk.
Parameters
- $id
- ID of the chunk to update.
- $name
- The name of the chunk.
- $description
- The description of the chunk.
- $content
- The content of the element.
- $catId
- The category Id to add the chunk to.
- $themeId
- The ID of the chunks theme.
Returns
boolean true if worked; else false.
|
public
boolean
|
#
updateSnippet( integer $id, string $name, string $description, string $content, string $catId )
Update a snippet.
Parameters
- $id
- The id of the snippet to update.
- $name
- The name of the snippet.
- $description
- The description of the snippet.
- $content
- The content of the snippet.
- $catId
- The category to add the element to.
Returns
boolean true if worked; else false.
|
public
|
#
deleteChunk( integer $id = 0 )
Delete a chunk.
Parameters
- $id
- The id of the chunk to delete.
|
public
boolean
|
#
deleteSnippet( integer $id )
Delete a snippet.
Parameters
- $id
- The id of the snippet to delete.
Returns
boolean true if deleted; else false.
|
public
array
|
#
getChunk( integer $id )
Get the data for a chunk.
Get the data for a chunk.
Parameters
- $id
- The Id of the the chunk.
Returns
array The chunk data.
|
public
array
|
#
getSnippet( integer $id )
Get the data for a snippet.
Get the data for a snippet.
Parameters
- $id
- ID of the snippet to get.
Returns
array Assosiative array of data or false if failed to read.
|
public
array
|
#
getChunksInCat( integer $themeId, integer $catId, boolean $templates )
Get the list of chunks that are in a category for a specified theme.
Get the list of chunks that are in a category for a specified theme.
Parameters
- $themeId
- The theme id.
- $catId
- The category id.
- $templates
- true to get template chunks; else false
Returns
array Array of chunks in the category for the theme.
|
public
array
|
#
getTemplateList( string $theme = '' )
Get the list of templates.
Get the list of templates.
Parameters
- $theme
- The name of the theme.
Returns
array Array of template chunks.
|
public
array
|
#
getSnippetsInCat( integer $catId )
Get the list of snippets that are in a category.
Get the list of snippets that are in a category.
Parameters
Returns
array Array of snippets in the category.
|
public
integer
|
#
getSnippetCount( )
Get the number of snippets in the system.
Get the number of snippets in the system.
Returns
integer Number of snippets.
|
public
integer
|
#
getChunkCount( integer $themeId, boolean $templates )
Get the number of chunks in the system in a theme.
Get the number of chunks in the system in a theme.
Parameters
- $themeId
- ID of the theme to count the chunks in.
- $templates
- true if counting template chunks; else false.
Returns
integer Number of chunks.
|