Class \Scrivo\PageProperty\Url
Property to hold html link data.
Page properties are a part of the page.
Note that PageProperties can't be created nor deleted using this class. PageProperties are created when the page itself is created, using the PageDefintion rules.
This is an abstract class that implements the methods for creating (factory method "create"), listing and updating page properties.
Legacy information: Page properties (including applications) are stored in serveral Scrivo data tables (page_property_html, page_property) as their definitions (page_definition_tab, page_property_definition, application_definition). This distiction is dropped, all these are accessed though a the single page property "properties".
Extends
\Scrivo\PageProperty .
Defined in:
PageProperty/Url.php.
Attr. | Name / Description |
---|---|
protected |
Url($page, $rd) Create an empty page property object. |
Attr. | Type | Name | Description |
---|---|---|---|
\..\String | $href | The link url (href attribute). | |
\..\String | $target | A link target (target attribute). | |
\..\String | $title | A descriptive tilte for the link (title attribute). |
Attr. | Type | Name | Description |
---|---|---|---|
private | \..\String | $data | The property data. |
private | int | $definitionId | The property defintion id. |
private | \..\String | $extData | A derived data of the property data. |
private | \..\String | $href | The href property of the url. |
private | \..\Page | $page | The page where this property belongs to. |
private | \..\String | $phpSelector | An textual identification/key for this property. |
private | \..\String | $target | The target property of the url. |
private | \..\String | $title | The title property of the url. |
private | \..\String | $type | The property type: one out of the TemplateProperty::TYPE_* constants. |
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 static | \..\Image |
create($page, $rd) Factory method to create page properties. |
protected |
fromData() Convert the property data field to the link members. |
|
protected |
setData($data) Set the property data. |
|
protected |
setExtData($extData) Set the property extended data. |
|
private |
toData() Convert the property data field to the link members. |
|
public |
update() Update page property object data in the database. |
|
private |
Update property data in the page_property_html table. |
|
private |
Update property data in the page_property table. |
|
private |
Check if this page property object can be updated in the database. |
Constructor
- protected Url(\Scrivo\Page $page, array $rd)
-
Create an empty page property object.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\Page $page This poperty's page.
array $rd An array containing the initial data (result set row).
View source: PageProperty.php line 99.
Members
- private \Scrivo\String $data
-
The property data.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 73.
- private int $definitionId
-
The property defintion id.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 85.
- private \Scrivo\String $extData
-
A derived data of the property data.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 79.
- private \Scrivo\String $href
-
The href property of the url.
View source: PageProperty/Url.php line 52.
- private \Scrivo\Page $page
-
The page where this property belongs to.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 91.
- private \Scrivo\String $phpSelector
-
An textual identification/key for this property.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 67.
- private \Scrivo\String $target
-
The target property of the url.
View source: PageProperty/Url.php line 64.
- private \Scrivo\String $title
-
The title property of the url.
View source: PageProperty/Url.php line 58.
- private \Scrivo\String $type
-
The property type: one out of the TemplateProperty::TYPE_* constants.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 61.
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: PageProperty/Url.php line 74.
- 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: PageProperty/Url.php line 93.
- public static \Scrivo\PageProperty\Image create(\Scrivo\Page $page, array $rd)
-
Factory method to create page properties.
The method will nog return a base PageProperty object but a sepacialized descendant based upon the given data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\Page $page The page for which to create the page property.
array $rd Array (result set row data) with the page property data.
Returns:
\Scrivo\PageProperty\Image Factory method to create page properties.
View source: PageProperty.php line 126.
- protected fromData()
-
Convert the property data field to the link members.
View source: PageProperty/Url.php line 105.
- protected setData(\Scrivo\String $data)
-
Set the property data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\String $data The property data.
View source: PageProperty.php line 215.
- protected setExtData(\Scrivo\String $extData)
-
Set the property extended data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\String $extData A derived data of the property data.
View source: PageProperty.php line 224.
- private toData()
-
Convert the property data field to the link members.
View source: PageProperty/Url.php line 116.
- public update()
-
Update page property object data in the database.
First it is checked if the data of this page property object can be updated in the database, then the data is updated in the database.
Inherited from \Scrivo\PageProperty
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: PageProperty.php line 248.
- private updateContent()
-
Update property data in the page_property_html table.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 311.
- private updateProperty()
-
Update property data in the page_property table.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 276.
- private validateUpdate()
-
Check if this page property object can be updated in the database.
Inherited from \Scrivo\PageProperty
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: PageProperty.php line 234.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013