Public Member Functions | |
| __construct ($id, $istype=FALSE, $pid=0, $sort=NULL, $page=NULL) | |
| Constructor. | |
| getRenderedContent ($id_renderer, $id_container=NULL) | |
| Get rendered content. | |
Static Public Member Functions | |
| static | add () |
Add a record in the table content. | |
| static | update () |
Edit a record in the table content. | |
| static | delete ($id) |
| Delete content. | |
Public Attributes | |
| const | FTYPE_BOOL = 1 |
| CMSkey field type constants. | |
| const | FTYPE_INT = 2 |
| integer | |
| const | FTYPE_UINT = 3 |
| unsigned integer | |
| const | FTYPE_FLOAT = 4 |
| floating | |
| const | FTYPE_DTIME = 5 |
| date/time | |
| const | FTYPE_STEXT = 6 |
| short text (max 255 chars) | |
| const | FTYPE_LTEXT = 7 |
| long text | |
| const | FTYPE_FTEXT = 8 |
| formatted long text | |
| const | FTYPE_IMAGE = 9 |
| image | |
| $cnt = array() | |
| current content | |
Private Member Functions | |
| getNextPos ($id_area, $id_type, $id_parent) | |
| Get specified content field value. | |
Private Attributes | |
| $id_area | |
| area id | |
Used to describe common properties and methods of derived extended content types.
Definition at line 38 of file content.php.
| Content::__construct | ( | $ | id, | |
| $ | istype = FALSE, |
|||
| $ | pid = 0, |
|||
| $ | sort = NULL, |
|||
| $ | page = NULL | |||
| ) |
Constructor.
Set private array $cnt[].
| id | content id or type id | |
| istype | (optional) if TRUE, id is a type id | |
| pid | (optional) parent content id - 0 means top level | |
| sort | (optional) sort/order mode - NULL means default (FIXME - explain!) must be two chars XY where X = [A|P|T] (A = alpha, P = position, T = time) Y = [A|D] (A = ascending, D = descending) | |
| page | (optional) content page number - NULL means all or max no. of content (according to configuration) |
Definition at line 71 of file content.php.
| Content::getNextPos | ( | $ | id_area, | |
| $ | id_type, | |||
| $ | id_parent | |||
| ) | [private] |
Get specified content field value.
| fieldname | (string) field name |
| id_area | area id | |
| id_type | content type id | |
| id_parent | content parent id |
Definition at line 153 of file content.php.
References $id_area.
Referenced by add().
| static Content::add | ( | ) | [static] |
Add a record in the table content.
Values to add are supposed to be in the global var $_POST. Here's the complete list:
id_parent : (int) parent content id id_type : (int) type id visible : (boolean) content visibility readperm : (int) read permission level writeperm : (int) write permission level group_readperm : (string) FIXME check allowed read groups (bitmask) group_writeperm: (string) FIXME check allowed write groups (bitmask) date_expiration: (int) content expiration date (UNIX time)
Definition at line 185 of file content.php.
References $cfg, $id_area, $session, and getNextPos().
| static Content::update | ( | ) | [static] |
Edit a record in the table content.
Values to edit are supposed to be in the global var $_POST. Here's the complete list:
id : (int) content id, used to identify record to edit visible : (boolean) content visibility readperm : (int) read permission level writeperm : (int) write permission level group_readperm : (string) FIXME check allowed read groups (bitmask) group_writeperm: (string) FIXME check allowed write groups (bitmask) date_expiration: (int) content expiration date (UNIX time)
Definition at line 230 of file content.php.
| static Content::delete | ( | $ | id | ) | [static] |
Delete content.
Recursively delete a content and all its related subcontents,attached files and images.
| id | (int) content id |
Definition at line 278 of file content.php.
References $cfg, $id_area, and Files::delete().
| Content::getRenderedContent | ( | $ | id_renderer, | |
| $ | id_container = NULL | |||
| ) |
Get rendered content.
Apply required renderers and get rendered content. Renderer is applied to each of the content items.
| id_renderer | renderer id | |
| id_container | (optional) container id |
Definition at line 341 of file content.php.
| const Content::FTYPE_BOOL = 1 |
| const Content::FTYPE_INT = 2 |
| const Content::FTYPE_UINT = 3 |
| const Content::FTYPE_FLOAT = 4 |
| const Content::FTYPE_DTIME = 5 |
| const Content::FTYPE_STEXT = 6 |
| const Content::FTYPE_LTEXT = 7 |
| const Content::FTYPE_FTEXT = 8 |
| const Content::FTYPE_IMAGE = 9 |
Content::$id_area [private] |
| Content::$cnt = array() |
1.5.3