Class DatabaseModel

Description

DatabaseModel class

Located in /inc/model/DatabaseModel.php (line 21)


        
                    
Method Summary
 static getDatabaseModel () Single
 backendCreatePageAction (string $path, string $defaultLang, array $recordContents) Result
 backendDeletePageAction (int $pageId) Result
 backendGetPageInformation (int $id) Array
 backendGetWebsitePagesAction (string $lang) Array
 backendMovePageDownAction (int $id) Result
 backendMovePageUpAction (int $id) Result
 backendSetPageInformation (int $id, array $page) Result
 frontendGetAllMetaTagsAction (string $lang,  $pageId, string $pageName) String
 frontendGetPageAdditionalCss (String $id) Name
 frontendGetPageAdditionalJs (String $id) Name
 frontendGetWebsiteContentAction (string $lang,  $pageId, string $pageName) String
 frontendGetWebsiteNavigationAction (string $lang) Array
 frontendGetWebsiteTitleAction (string $lang,  $pageId, string $pageName) String
 getPageId (String $pagePath) Integer
 getPagePath (String $pageId) String
Methods
static getDatabaseModel (line 60)

Singleton-create-method

  • return: instance of DatabaseModel-Class
  • access: public
Single getDatabaseModel ()
backendCreatePageAction (line 787)

Method to create a new page with one default record

  • return: of file_put_contents
  • throws: CaramelException
  • access: public
Result backendCreatePageAction (string $path, string $defaultLang, array $recordContents)
  • string $path: URL path of the new page
  • string $defaultLang: Language for default record of the new page
  • array $recordContents: Array with contents of default record
backendDeletePageAction (line 752)

Method to delete a single page with all records

  • return: of file_put_contents
  • throws: CaramelException
  • access: public
Result backendDeletePageAction (int $pageId)
  • int $pageId: Id of the page
backendGetAllPageNamesAction (line 944)

Method to return only all page paths

  • return: with all page paths.
  • throws: CaramelException
  • access: public
Array backendGetAllPageNamesAction ()
backendGetPageInformation (line 585)

Method to get all page information incl. records for one page-id

  • return: with all information to page with $id
  • throws: CaramelException
  • access: public
Array backendGetPageInformation (int $id)
  • int $id: Id from one specific page
backendGetWebsitePagesAction (line 487)

Method to return array with all pages and subpages Note: Navigation is restricted to one sublevel

  • return: with all pages
  • throws: CaramelException
  • access: public
Array backendGetWebsitePagesAction (string $lang)
  • string $lang: Current language
backendMovePageDownAction (line 907)

Wrapper method to move a node one down

  • return: of the save action
  • throws: CaramelException
  • access: public
Result backendMovePageDownAction (int $id)
  • int $id: ID of the page-node
backendMovePageUpAction (line 869)

Wrapper method to move a node one up

  • return: of the save action
  • throws: CaramelException
  • access: public
Result backendMovePageUpAction (int $id)
  • int $id: ID of the page-node
backendSetPageInformation (line 672)

Method to get all page information incl. records for one page-id

  • return: of file_put_contents
  • throws: CaramelException
  • access: public
Result backendSetPageInformation (int $id, array $page)
  • int $id: Id from one specific page
  • array $page: Array with modified page information
frontendGetAllLanguagesAction (line 86)

Method to get all used languages out of database

  • return: with all used language-codes
  • throws: CaramelException
  • access: public
Array frontendGetAllLanguagesAction ()
frontendGetAllMetaTagsAction (line 119)

Method to return all meta information for the given page/language

  • return: with all needed meta information to one page
  • throws: CaramelException
  • access: public
String frontendGetAllMetaTagsAction (string $lang,  $pageId, string $pageName)
  • string $lang: Current language used
  • string $pageName: Name of the current page
  • $pageId
frontendGetPageAdditionalCss (line 438)

Method to get the additional CSS file for this page

  • return: of the additional CSS file
  • throws: CaramelException
  • access: public
Name frontendGetPageAdditionalCss (String $id)
  • String $id: ID of the page
frontendGetPageAdditionalJs (line 462)

Method to get the additional JS file for this page

  • return: of the additional JS file
  • throws: CaramelException
  • access: public
Name frontendGetPageAdditionalJs (String $id)
  • String $id: ID of the page
frontendGetWebsiteContentAction (line 274)

Method to return the content of a page

  • return: with correct website content
  • throws: CaramelException
  • access: public
String frontendGetWebsiteContentAction (string $lang,  $pageId, string $pageName)
  • string $lang: Current language used
  • string $pageName: Name of the current page
  • $pageId
frontendGetWebsiteNavigationAction (line 335)

Method to return array with localized navigation Note: Navigation is restricted to one sublevel

  • return: with localized navigation information
  • throws: CaramelException
  • access: public
Array frontendGetWebsiteNavigationAction (string $lang)
  • string $lang: Current language
frontendGetWebsiteTitleAction (line 229)

Method to return the needed website title

  • return: with correct website title
  • throws: CaramelException
  • access: public
String frontendGetWebsiteTitleAction (string $lang,  $pageId, string $pageName)
  • string $lang: Current language used
  • string $pageName: Name of the current page
  • $pageId
getPageId (line 976)

Method to return a page ID for given page path

  • return: of the page ID
  • throws: CaramelException
  • access: public
Integer getPageId (String $pagePath)
  • String $pagePath
getPagePath (line 1006)

Method to return a page path for given page ID

  • return: of the page path
  • throws: CaramelException
  • access: public
String getPagePath (String $pageId)
  • String $pageId