Difference between revisions of "Core"
(New page: ====== SpinCMS Core Class ====== ===== SpinCMS Instansiation ===== === PCMS_Client::singleton (dsn, account, basePath) === Instansiate the singleton class. This is done only once during th...) |
|||
Line 1: | Line 1: | ||
+ | ~~NOTOC~~ | ||
====== SpinCMS Core Class ====== | ====== SpinCMS Core Class ====== | ||
===== SpinCMS Instansiation ===== | ===== SpinCMS Instansiation ===== |
Revision as of 23:36, 23 December 2008
~~NOTOC~~
Contents
- 1 SpinCMS Core Class
- 2 SpinCMS Instansiation
- 3 PCMS_Client::singleton (dsn, account, basePath)
- 4 PCMS_Client::getInstance ()
- 5 get ([elementApiName], [recursive])
- 6 getElements ([elementApiName], [getFirst], [recursive])
- 7 getFolders ([elementApiName], [getFirst])
- 8 getElementById (elementId)
- 9 getFieldById (elementFieldId)
- 10 getElementByTemplate (templateApiName, [recursive], [random])
- 11 getElementsByTemplate (templateApiName, [getFirst], [recursive], [random])
- 12 getElementByTemplateId (templateId, [recursive], [random])
- 13 getElementsByTemplateId (templateId, [getFirst], [recursive], [random])
- 14 getElementsFromParent (elementId, [getFirst], [recursive])
- 15 getAliasId ()
- 16 find (query, filters, [exact], [arrAllowedTypes])
- 17 getLanguages ()
- 18 getLanguage ()
- 19 getBasePath ()
- 20 setBasePath (value)
- 21 getFilePath ()
- 22 getDownloadPath ()
- 23 getFromCache (method, elementId, [arguments])
- 24 getSetting (value)
- 25 useAliases (value)
- 26 setDbConnection ([reInit])
SpinCMS Core Class
SpinCMS Instansiation
PCMS_Client::singleton (dsn, account, basePath)
Instansiate the singleton class. This is done only once during the execution of a page.\\
- Details**
PCMS_Client::getInstance ()
Get the CMS object instance. This way you don't have to work with a global CMS object.\\
- Details**
SpinCMS Methods
get ([elementApiName], [recursive])
Get the first element or folder with an optional specific api name from the root folder.\\
- Details**
getElements ([elementApiName], [getFirst], [recursive])
Get a collection of elements and folders with an optional specific api name from the root folder.\\
- Details**
getFolders ([elementApiName], [getFirst])
Get a collection of folders with an optional specific api name from the root folder.\\
- Details**
getElementById (elementId)
Get an element or folder with a specific id from the CMS. If not found it will return NULL.\\
- Details**
getFieldById (elementFieldId)
Get a field with a specific id from the CMS.\\
- Details**
getElementByTemplate (templateApiName, [recursive], [random])
Get the first element with a specific template api name from the root folder.\\
- Details**
getElementsByTemplate (templateApiName, [getFirst], [recursive], [random])
Get a collection of elements with a specific template api name from the root folder.\\
- Details**
getElementByTemplateId (templateId, [recursive], [random])
Get the first element with a specific template id from the root folder.\\
- Details**
getElementsByTemplateId (templateId, [getFirst], [recursive], [random])
Get a collection of elements with a specific template id from the root folder.\\
- Details**
getElementsFromParent (elementId, [getFirst], [recursive])
Get a list of elements with a specific parent id.\\
- Details**
getAliasId ()
Get the element id converted from the curent URL alias.\\
- Details**
find (query, filters, [exact], [arrAllowedTypes])
Search through the CMS using a query and optional filters.\\
- Details**
getLanguages ()
Get a collection of all active languages.\\
- Details**
getLanguage ()
Get the currently active language.\\
- Details**
getBasePath ()
Get the base path to the website.\\
- Details**
setBasePath (value)
Set the base path of the website. This overrides the value from the singleton method.\\
- Details**
getFilePath ()
Get the base path to files uploaded by the CMS.\\
- Details**
getDownloadPath ()
Get the base path to files uploaded by the CMS relative to the website path.\\
- Details**
getFromCache (method, elementId, [arguments])
Get the output of a method from the cache. If output doesn't exist is will call the method, cache and return the output.\\
- Details**
getSetting (value)
Get the value of a setting in the CMS.\\
- Details**
useAliases (value)
Set wether aliases should be used or not. Using aliases has a slight performance impact.\\
- Details**
setDbConnection ([reInit])
This method forces a reset on the internal database connection object.\\
- Details**