Class \Scrivo\ListItem
A Scrivo list item is a simple data structure for list item data.
List items contain a fixed set of properties and a variable set of properties as definded in its list item property definition.
Instances of this class are created through objects of the \Scrivo\ItemList class. Either by retrieving them as items that were previously added to the list or by using the \Scrivo\ItemList::newItem(\Scrivo\String $type) method.
Defined in: ListItem.php.
Attr. | Name / Description |
---|---|
public |
ListItem($rd, $properties) Create an and initalize a list item object. |
Attr. | Type | Name | Description |
---|---|---|---|
read-only | DateTime | $dateCreated | The date/time that this list item was created. |
read-only | DateTime | $dateModified | The last date/time that this list item was modified. |
DateTime | $dateOffline | The date/time this list item need to go offline. | |
DateTime | $dateOnline | The date/time this list item need to go online. | |
read-only | int | $definitionId | The id of the defintion of the list item. |
read-only | int | $id | The list item's id (DB key). |
read-only | int | $linkedPageId | An optional id of a linked page. |
read-only | int | $listId | The id of the list where this list item belongs to. |
read-only | int | $pageId | The id of the page where this list item belongs to. |
int | $parentId | The id of the parent list item. | |
\..\String | $title | The list item title. |
Attr. | Type | Name | Description |
---|---|---|---|
protected | DateTime | $dateCreated | The date/time that this list item was created. |
protected | DateTime | $dateModified | The last date/time that this list item was modified. |
protected | DateTime | $dateOffline | The date/time this list item need to go offline. |
protected | DateTime | $dateOnline | The date/time this list item need to go online. |
private | int | $definitionId | The id of the defintion of the list item. |
private | int | $id | The list items id (DB key). |
private | int | $linkedPageId | An optional id of a linked page. |
private | int | $listId | The id of the list where this list item belongs to. |
private | int | $pageId | The id of the page where this list item belongs to. |
private | int | $parentId | The id of the parent list item. |
protected | object | $properties | The list item properties |
protected | \..\String | $title | The list item title. |
private | int | $version | The current version of the page: -1: scratch version, 0 live version, 1 and up versions. |
Attr. | Type | Name / Description |
---|---|---|
public | mixed |
__get($name) Implementation of the readable properties using the PHP magic method __get(). |
public |
__set($name, $value) Implementation of the writable properties using the PHP magic method __set(). |
|
public |
setDateOffline($dateOffline) Set The date/time this page need to go offline. |
|
public |
setDateOnline($dateOnline) Set The date/time this page need to go online. |
|
public |
setParentId($parentId) Set The id of the parent list item. |
|
public |
setTitle($title) Set The page title (<title>). |
Constructor
- public ListItem(array $rd, \Scrivo\PropertySet $properties)
-
Create an and initalize a list item object.
Parameters:
Type Name Def. Description array $rd An array containing the field data using the database field names as keys.
\Scrivo\PropertySet $properties An array containing the list item properties.
View source: ListItem.php line 147.
Members
- protected \DateTime $dateCreated
-
The date/time that this list item was created.
Inital value: null
View source: ListItem.php line 113.
- protected \DateTime $dateModified
-
The last date/time that this list item was modified.
Inital value: null
View source: ListItem.php line 119.
- protected \DateTime $dateOffline
-
The date/time this list item need to go offline.
Inital value: null
View source: ListItem.php line 131.
- protected \DateTime $dateOnline
-
The date/time this list item need to go online.
Inital value: null
View source: ListItem.php line 125.
- private int $definitionId
-
The id of the defintion of the list item.
Inital value: 0
View source: ListItem.php line 95.
- private int $id
-
The list items id (DB key).
Inital value: 0
View source: ListItem.php line 65.
- private int $linkedPageId
-
An optional id of a linked page.
Inital value: 0
View source: ListItem.php line 101.
- private int $listId
-
The id of the list where this list item belongs to.
Inital value: 0
View source: ListItem.php line 71.
- private int $pageId
-
The id of the page where this list item belongs to.
Inital value: 0
View source: ListItem.php line 77.
- private int $parentId
-
The id of the parent list item.
Inital value: 0
View source: ListItem.php line 89.
- protected object $properties
-
The list item properties
Inital value: null
View source: ListItem.php line 137.
- protected \Scrivo\String $title
-
The list item title.
Inital value: null
View source: ListItem.php line 107.
- private int $version
-
The current version of the page: -1: scratch version, 0 live version, 1 and up versions.
Inital value: 0
View source: ListItem.php line 83.
Methods
- public mixed __get(string $name)
-
Implementation of the readable properties using the PHP magic method __get().
Parameters:
Type Name Def. Description string $name The name of the property to get.
Returns:
mixed Implementation of the readable properties using the PHP magic method __get().
View source: ListItem.php line 174.
- public __set(string $name, mixed $value)
-
Implementation of the writable properties using the PHP magic method __set().
Parameters:
Type Name Def. Description string $name The name of the property to set.
mixed $value The value of the property to set.
View source: ListItem.php line 200.
- public setDateOffline(\DateTime $dateOffline=null)
-
Set The date/time this page need to go offline.
Parameters:
Type Name Def. Description \DateTime $dateOffline null The date/time this page need to go offline.
View source: ListItem.php line 248.
- public setDateOnline(\DateTime $dateOnline)
-
Set The date/time this page need to go online.
Parameters:
Type Name Def. Description \DateTime $dateOnline The date/time this page need to go online.
View source: ListItem.php line 239.
- public setParentId(int $parentId)
-
Set The id of the parent list item.
Parameters:
Type Name Def. Description int $parentId The id of the parent list item.
View source: ListItem.php line 215.
- public setTitle(\Scrivo\String $title)
-
Set The page title (<title>).
Parameters:
Type Name Def. Description \Scrivo\String $title The page title (<title>).
View source: ListItem.php line 230.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013